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 
CodePudding user response:
You can define your ellipse as a sequence of transformations that are applied to the unit circle:
- Stretch by
aandb. - Rotate by
angle. - 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.

