Page 3
Intersection of segments in 2D
Page 4
Index
See this article in english 
Page 5
Line normals

Angle between two lines

Alexander Hristov

 

Angle between two lines

Generally speaking, the angle between two lines is defined as the angle that the one of them must be rotated in order to match the slope of the other one.

Angle between two lines

If we have two intersecting non-vertical lines, the angle between them is:

β = φ+α ⇒ φ = β-α

Therefore, tan(φ) = tan(β-α) = (tan(β)-tan(α))/(1+tan(β)tan(α)).

So if your lines are y = a1x+b1 and y = a2x+b2 the angle between them is

tan(φ) = (a1- a2)/(1+a1a2)

If one of the lines is vertical, the angle between it and y = ax+b is

tan(φ) = 1/a

Form Angle between the lines

y = a1x+b1
y = a2x+b2

φ =arctan (a1- a2)/(1+a1a2)
y = y01t + yf1  x = x01t + xf1
y = y02t + yf2  x = x02t + xf2

or


Gives the angle that the SECOND line must be rotated counter-clockwise in order to match the FIRST line  

Four points: (x1,y1) , (x2,y2)
and (x3,y3) ,(x4,y4)


Gives the angle that the SECOND (x3,y3) ,(x4,y4) line must be rotated counter-clockwise in order to match the FIRST line   (x1,y1) , (x2,y2)

a1x+b1y+c1 = 0 and
a2x+b2 y + c2 = 0

 

Comments

Jun 23, 2008 at 08:01 Sent by anonymous
rrwr 23r3 r23r 3r3 r3 r33t3t 3

 

Add a Comment

Name (optional)
EMail (optional, will not be displayed)

Text