Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / May 2006

Tip: Looking for answers? Try searching our database.

Find angle between 2 points using 2d coordinates.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
velu - 22 May 2006 11:47 GMT
Find angle between 2 points using 2d coordinates.

I am trying to write a tool to find angle between 2 coordinates in 2d space.

I know the distance of adjacent side and hypotenuse.

Cos(angle) = adjacent side / hypotenuse

Angle = (adjacent side / hypotenuse) inverse of Cos

I exactly don’t know where to find and use the inverse function in vb.net

Your help much appreciated..

Thx
JK
FUnky - 22 May 2006 12:29 GMT
Use System.Math.Acos(xxx)
velu - 22 May 2006 12:53 GMT
thx for respoding fast but i get a wrong Answer.

say for example lets take a erual triagnel of sides each 6 units. so
Cos(xxx) = Adj / Hyp
ie

Cos(Angle) = 3 / 6
Cos(Angle)= 0.5
(Angle) = o.5 invers of Cos
(Angle) = 60Deg

but i use the as per your thoughs

if i use

System.Math.Acos(xxx) ie System.Math.Acos(0/5)  i get 1.047198

i am in chaos...help me..

-JK

> Use System.Math.Acos(xxx)
Marc Gravell - 22 May 2006 13:17 GMT
60 degrees = 1.04719755 [etc] radians

Same answer, but a lot of math on trigonometry is expressed in radians;

to get back to 60, divide by Pi and multiply by 180 (or look for an existing
conversion function)

Marc

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.