How can i get the angle between to lines?

Status
Not open for further replies.

Crigui

Usenet Archive
Joined
Sep 28, 2001
Messages
39
Reaction score
0
HI,

How to get the numeric value of the algle between 2 lines??

Thanks and have a happy new year!!!

Crigui
 
Crigui...

How to get the numeric value of the algle between 2 lines??

1 Verify that the lines intersect (mdlIntersect_allBetweenElms ) 2 Extract the vertices of each line (mdlLinear_extract) 3 Use basic trignomentry to compute an angle
 
Hi

You can get the angle by getting the intersection
(mdlIntersect_allBetweenElms )

Then you get the direction of both lines with the function mdlElmdscr_distanceAtPoint there you get an tangent (a vecter length
1.0) in the derection of the line on that spot.

Now you can calculate the angle of both lines out of these vectors using atan2

This way it works on all linear elements in ustation.

Greetings Olaf Giezenaar

"Jon Summers" wrote:
Crigui...

> How to get the numeric value of the algle between 2 lines??

1 Verify that the lines intersect (mdlIntersect_allBetweenElms ) 2 Extract the vertices of each line (mdlLinear_extract) 3 Use basic trignomentry to compute an angle
 
You can use mdlVec_dotProduct (...)
This function returns the cosine of the angle between the two vectors multiplied by the magnitude of each vector.

Dan

On 2 Jan 2002 08:27:28 -0800, (Crigui) wrote:

HI,

How to get the numeric value of the algle between 2 lines??

Thanks and have a happy new year!!!

Crigui
 
Status
Not open for further replies.

Latest threads

Back
Top