0

Given two points $F_1$ and $F_2$, and a line $n \cdot (r - r_0) = 0$, where $r = (x,y) , r_0 = (x_0, y_0), n = (n_1, n_2)$, I'd like to construct the ellipse having foci $F_1$ and $F_2$ and tangent to the line. In this post, the same problem is addressed, but the question there asks for construction using a straightedge and a compass. And the answer gives a description of how to construct such an ellipse using a string. There is no mention of the equation of the ellipse.

I was wondering if someone could shed more light on this problem and produce a closed-form equation of the ellipse in terms of the given $F_1, F_2$ and $ n $ and $ r_0 $.

This is my attempt:

Let $r = [x, y]^T $ be the position vector of a point in the plane. To simplify the analysis, I'll introduce a new coordinate reference with its origin at the center of the ellipse. This is known, because the center of the ellipse is just the midpoint of the two foci. So let

$ C = \dfrac{1}{2} (F_1 + F_2) $

And define the unit vector

$ u_1 = \dfrac{ F_2 - F_1}{\| F_2 - F_1 \| } $

And let $u_2 $ be a unit vector that is perpendicular to $u_1$. Now define the rotation matrix

$ R = [u_1, u_2] $

By letting the $x'$ axis point along $u_1$ and the $y'$ axis point along $u_2$ , then if $p' = (x',y')$ is the local coordinate of a (world) point $p$ with resepct to this new frame, then then two vectors are related by

$ p = C + R p' $

So that

$ p' = R^T (p - C) $

Using these new coordinates, the two foci are now at $F'_1 = (-c, 0)$ and $F'_2 = (c, 0) $. Now, we need to find the equation of the line in the transformed coordinates. The equation of the line is

$ n^T (r - r_0) = 0 $

Substitute $r = C + R r' $, then

$ n^T (C - r_0 + R r' ) = 0 $

Pull $R$ out,

$ n^T R ( R^T (C - r_0) + r') = 0 $

Define $r'_0 = - R^T (C - r_0) $ and $n' = R^T n $, then the equation of the line in the new coordinates is

$ n'^T ( r' - r'_0) =0 $

Now the equation of the ellipse to be found is

$ \dfrac{x^2}{a^2} + \dfrac{y^2}{a^2 - c^2} = 1 $

where $x$ and $y$ here are coordinates in the new coordinate system, and $a^2 $ is unknown. That is,

$ r'^T Q' r' = 1$

where $r' = [x,y] $

and $ Q' = \begin{bmatrix} \dfrac{1}{a^2} && 0 \\ 0 && \dfrac{1}{a^2 - c^2} \end{bmatrix} $

The gradient at $r'$ is along $Q r'$ which, because of tangency, is in the direction of the normal vector to the line. That is,

$ Q' r' = k n' $ for some $k$.

It follows that $ r' = k Q'^{-1} n' $

Substituting $r'$ into the equation of the ellipse above, this gives
$ k = \dfrac{1}{\sqrt{ n'^T Q'^{-1} n '}}$

Hence, $n'^T (r' - r0) = 0 = \sqrt{ n'^T Q'^{-1} n' } - n'^T r'_0 $

Therefore,

$ n'^T Q'^{-1} n' = (n'^T r'_0)^2 $

Recall that

$Q'^{-1} =\begin{bmatrix} a^2 && 0\\ 0 && a^2 - c^2 \end{bmatrix}$

Therefore, if $n' = [n_1, n_2]$ , then the above equation becomes,

$a^2 n_1^2 + (a^2 - c^2) n_2^2 = (n'^T r_0)^2 $

Which can be readily solved for $a$.

Now, to find the equation of the un-transformed ellipse, we use the relation

$ r = C + R r' $

So that $ r' = R^T (r - C) $

Substitute this into the equation of our ellipse which is

$ r'^T Q' r' = 1 $

to get

$ (r - C)^T R Q' R^T (r - C) = 1 $

And that is the equation of the ellipse in the original (world) coordinate system.


This is one way to go. Another, more direct way, is as follows.


Using the same notation as above, and introducing the vector

$ U = \dfrac{1}{2} (F_2 - F_1) $

The equation of the ellipse having vertices $F_1$ and $F_2$ and with semi-major axis length $a$ is given by see here for a derivation

$ (r - C)^T (a^2 I - U U^T ) (r - C) = a^2 b^2 = a^2 (a^2 - c^2) $

where $C = \dfrac{1}{2} (F_1 + F_2)$ and $c = \dfrac{1}{2} \| F_2 - F_1 \| $

We need to determine $a$. And for that, as in my answer here, it follows from the fact that the normal vector to the ellipse curve at a point $P$ on it, bisects the angle between $PF_1$ and $PF_2$, that we can construct the tangency point with the line by reflecting either focus $F_1$ or $F_2$ about the line of tangency and connecting the reflected point with the other focus, then the intersection point between the given line (which we used to reflect a focus) and the line segment connecting the reflected focus and the other focus is the tangency point with the line.

Suppose we choose to reflect $F_1$ about the given line $n \cdot (r - r_0) = 0 $ , then the coordinates of its image under reflection is given by

$ F'_1 = r_0 + (I - 2 \dfrac{n n^T}{n^T n} ) (F_1 - r_0 ) $

Now connect $F'_1$ with $F_2$. It follows from the symmetry of reflection that

$2 a = \| F_1 P \| + \| F_2 P \| = \| F'_1 P \| + \| F_2 P \| = \| F'_1 F_2 \|$

Hence, $a$ is just half the distance between $F'_1$ and $F_2$, i.e.

$ a = \dfrac{1}{2} \| F'_1 F_2 \| $

Now the specification of the ellipse is complete.

  • 1
    If $F_i=(x_i,y_i)$, then a form of the equation is $$\sqrt{(x-x_1)^2+(y-y_1)^2}+\sqrt{(x-x_2)^2+(y-y_2)^2}=|F_1F_2'|$$ where $F_2'$ is the reflection of $F_2$ in the given line. Do you need help finding $F_2'$? and/or eliminating the square roots? – Blue Feb 13 '24 at 12:08
  • What does what mean? ... Given your list of questions and answers, it would seem to me as though what I wrote should be comprehensible to you. If something actually doesn't make sense, then you'll need to tell me exactly what that is and to give me an idea of how I need to adjust the explanation to best serve you. – Blue Feb 13 '24 at 12:28

1 Answers1

2

Given

$$ \cases{ p = (x,y)\\ F_1=(x_1,y_1)\\ F_2=(x_2,y_2)\\ p_0 = (x_0,y_0) } $$

an ellipse is a geometric locus such that

$$ \|p-F_1\|+\|p-F_2\|=l,\ \ \ l\gt \|F_1-F_2\| $$

and a line

$$ y = y_0 + m(x-x_0) $$

the ellipse locus is immersed on

$$ 4l^2\|p-F_2\|^2-(l^2-\|p-F_1\|^2+\|p-F_2\|^2)^2=0 $$

or

$$ 4l^2((x-x_2)^2+(y-y_2)^2)-(l^2-x_1^2+2x(x_1-x_2)+x_2^2+2y y_1-y_1^2-2y y_2+y_2)^2=0 $$

As this locus is tangent to the line, after eliminating the line, or substituting $y = y_0 + m(x-x_0)$ remains a polynomial involving $x$ which should have a double root due tangency. After substitution we have

$$ c_0 + c_1l^2-l^4+c_2 x + c_3 l^2x + c_4x^2+c_5 l^2x^2=k_0(x-r_0)^2 $$

now calling $l^2=L$

$$ c_0 + c_1L-L^2+c_2 x + c_3 Lx + c_4x^2+c_5 Lx^2-k_0(x-r_0)^2=0 $$

and this should be true for all $x$ then

$$ \cases{ c_0+c_1 L-L^2-k_0 r_0^2=0\\ c_2+c_3L+2k_0r_0=0\\ c_4-k_0+c_5L=0 } $$

Given

$$ \cases{ F_1=(0,0)\\ F_2=(3,3)\\ p_0=(-2,-2)\\ m=-4 } $$

we have

$$ -6084 + 556 L - L^2 - 2808 x + 356 L x - 324 x^2 + 68 L x^2 - k_0 (x-r_0)^2=0 $$

and

$$ \cases{ -6084 + 556 L - L^2 - k_0 r_0^2=0\\ -2808 + 356 L + 2 k_0 r_0=0\\ -324 - k_0 + 68 L = 0 } $$

and solving we got

$$ k_0 = 4900, r_0 = -\frac{298}{119}, l = \sqrt{\frac{1306}{17}} $$

follows a plot for the solution

enter image description here

Cesareo
  • 36,341