[Math] Intersection of two ellipses

conic sectionsgeometry

I do not have a background in mathematics and geometry, so I will be so thankful if someone please give me a simple way to get the following, as I tried to understand some posts related to this issues, but I couldn't get a clear idea:

Giving two axis parallel ellipses with the parameters of the center of each ellipse $(x_0, y_0)$ for the first ellipse, $(x_1, y_1)$ for the second, and the major and minor radius for each $(h_0, k_0)$ for the first and $(h_1, k_1)$ for the second. My questions are

  1. How to know if two ellipses are intersecting?
  2. How to calculate the intersection area between the two ellipses?

Thank you in advance.

Best Answer

Test for intersection:

You can stretch space in one axis so that one of the ellipses is transformed in a circle. Then there is intersection if

  • the center of the circle is inside the ellipse, or
  • the center is outside but the distance between the point and the ellipse outline is smaller than the radius.

Testing insideness is immediate (plug the coordinates of the center in the implicit equation of the ellipse and check the sign).

Computing the distance is another matter. Let the center of the circle be $(x,y)$ and the ellipse be at the origin (WLOG), with semi-axis $a,b$ (sorry for the change of notation, I can't help it). The squared distance between the given point and an arbitrary point on the ellipse outline is

$$d^2=(a\cos(t)-x)^2+(b\sin(t)-y)^2.$$

The extrema of the distance are achieved when the derivative cancels, i.e.

$$-a\sin(t)(a\cos(t)-x)+b\cos(t)(b\sin(t)-y)=0$$ which can be written

$$\frac{ax}{\cos(t)}-\frac{by}{\sin(t)}=a^2-b^2.$$

This equation can be rationalized by the usual transform

$$\cos(t)=\frac{1-z^2}{1+z^2},\sin(t)=\frac{2z}{1+z^2},$$

giving the quartic equation

$$byz^4 + 2(ax + (a^2-b^2))z^3 + 2(ax -(a^2-b^2)^2)z-by= 0.$$

One of the real roots gives the shortest distance.

Related Question