I'm interested in finding the four common tangents between two ellipses. While I've found some fascinating approaches using dual conics to identify their intersection points (link 1, link 2), my primary objective is to obtain the tangent equations in the original Cartesian coordinate system.
The methods I've come across seem to work within the realm of projective geometry, which is beyond my current mathematical expertise. Any help in simplifying this to Cartesian coordinates would be invaluable.
My Current Understanding
Let's say we have two ellipses defined by their canonical matrices E1
and E2
.
-
Dual Conics: The common tangents can be found at the intersection points of the dual conics
C1 = E1^-1
andC2 = E2^-1
. -
Intersection Points: To find these, we consider the pencil of conics
C1 - t * C2
(wheret
is real) and solve fort
indet(C1 - t * C2) = 0
. Since this is a cubic equation, it yields up to three rootst0
,t1
, andt2
, which correspond to up to three degenerate conics—usually intersecting lines. The equation for these degenerate conics isC1 - t_i * C2 = 0
. -
Coordinates of Intersection Points: As these points lie on the conics, for each
t_i
we should have:(C1 - t_i * C2) * X_i = 0
Subsequently:
((C2^-1 * C1) - t_i * I) * X_i = 0
Based on an answer by @Futurologist here, this is an eigenvalue equation, with t_i
as the eigenvalue and X_i
as the eigenvector. Therefore, X_i
should give me the coordinates of the intersection points, which should also provide the coefficients for the tangents in Cartesian coordinates.
Have I understood this correctly, or is there something I'm missing?
Example
Let's have a concrete example with the 2 ellipsis:
E1: 36 * x^2 + 9 * y^2 - 324 = 0
and
E2: 4 * x^2 + y^2 - 56 * x - 6 * y + 201 = 0
Considering the method I described above, please can you explain how you get the four tangents final equations?
Best Answer
Update: complex numbers
This implementation with complex numbers seems to work for now
Previous version: real version, non-intersecting ellipses
If an algorithm is what you are seeking, here is one, based on my previous posts you cited:
I tested it with one example, and it worked, but have not run more tests. Here is a test script:
After running this particular test, I got as output:
Then I went to Desmos, because I find it convenient, and plotted the output, just to check visually: