Angle between two lines

Angle between two lines

Rob.O
Collaborator Collaborator
1,351 Views
3 Replies
Message 1 of 4

Angle between two lines

Rob.O
Collaborator
Collaborator

Hi Everyone!

 

I have seen a couple of threads on this, but nothing really thouroghly explained it.

 

I am looking for two things...

 

1) A good explanation of Vector3d.  I have been unable to find a good explanation in the ARX documentation or on the online .Net developers guide.

 

2) SOme help with getting the angle between two lines.  The lines in question are in an orientaion similar to the greater than operator ( > ).  I have attempted to use the Vector3d.GetAngleTo method to get the angle, but I do not understand it enough to be sucessful!

 

TIA!

0 Likes
1,352 Views
3 Replies
Replies (3)
Message 2 of 4

StephenPreston
Alumni
Alumni

Taking a stab in the dark ... Perhaps you don't understand the result of calling GetAngleTo() because you didn't notice the the angle returned is in Radians and not Degrees. There are Pi Radians in 180 Degrees, so multiply the result by 180/Math.Pi to find the value in degrees. I'd use that function something like this:

 

 

 

Dim radAngle As Double = line1.Delta.GetAngleTo(line2.Delta)

 

where line1 and line2 are two Line objects.

 

Could you expand on what type/level of explanation you need for the Vector3d class. Are there particular methods or properties that aren't well documented? Or if the problem is understanding vectors in general, then a quick google returns a few websites with vector tutorials, like http://hyperphysics.phy-astr.gsu.edu/hbase/vect.html or http://scienceblogs.com/dotphysics/2008/09/basics-vectors-and-vector-addition/. The Vector3d class is a pretty standard representation of a 3d vector. (My apologies for pointing to some basic tutorials if you're already very familiar with vectors).

 

 

Cheers,

Stephen Preston
Autodesk Developer Network
0 Likes
Message 3 of 4

jeff
Collaborator
Collaborator

Here is another great resource for vectors and other math topics

http://www.khanacademy.org/#browse

You can also find your answers @ TheSwamp
0 Likes
Message 4 of 4

Rob.O
Collaborator
Collaborator

Got it working!

 

Thank you both for the links and advice!

0 Likes