Home > Enterprise >  Tangent lines to a rotated ellipse from a point
Tangent lines to a rotated ellipse from a point

Time:01-25

I need to calculate the equations of tangent lines to a rotated ellipse from a specific point outside of the ellipse. I found Ellipse.rotate() method in Example plot

CodePudding user response:

You can define your ellipse as a sequence of transformations that are applied to the unit circle:

  1. Stretch by a and b.
  2. Rotate by angle.
  3. Translate by center.

Then this sequence of transformations can be applied in reverse order and using the inverse of each transformation to the reference point, in order to solve the problem w.r.t. the unit circle. Here the angles of the two tangent points on the unit circle are given by the constraint of perpendicularity: 1 - p0*cos(t) - q0*sin(t) = 0 where p0, q0 is the reference point.

See Example plot

  •  Tags:  
  • Related