Skip to content Skip to sidebar Skip to footer

Angle Between Tangents To Ellipse From External Points With Slopes Of Tangents

Let in a 2D problem you are given with slopes of two lines say (m1 & m2). Now, how should I know what the angle between the two lines is? I tried like this: from math import at

Solution 1:

Slopes don't contain full information about line direction (two directions are possible), so it is hard to decide what angle is needed (alpha or 180-alpha) in your case. Moreover, slope usage is limited, because vertical line has no legal slope value.

Perhaps it would be wise to use direction vectors for lines, in this case

atan2(d1 x d2, d1.dot.d2) 

gives signed angle needed to rotate d1 to d2.

But how are you going to use this angle?

Post a Comment for "Angle Between Tangents To Ellipse From External Points With Slopes Of Tangents"