Find an intersection point between a line and an ellipse, where the line passes from the center of the ellipse

conic sectionsgeometry

How to find an intersection point between a line and an ellipse, where the line passes from the center of the ellipse?

I know everything about the ellipse.

I know the angle $(\theta)$ (whose $\tan$ will be slope) and starting point of the line (where the starting point is the center of the ellipse).

Here are the equations which I'm trying to use:
$$\frac{(x-x_{0})^2}{a^2} + \frac{(y-y_{0})^2}{b^2}$$
$$y = \tan(\theta) \cdot x + n$$
$$n = y_{0} – x_{0} \cdot \tan(\theta)$$

Best Answer

First, I assume the ellipse you're using has a center at $(x_0,y_0)$, a width of $2a$ and a height of $2b$. If so, the entire equation then is

$$\frac{(x-x_{0})^2}{a^2} + \frac{(y-y_{0})^2}{b^2} = 1 \tag{1}\label{eq1A}$$

You also give

$$y = \tan(\theta) \cdot x + n \tag{2}\label{eq2A}$$ $$n = y_{0} - x_{0} \cdot \tan(\theta) \tag{3}\label{eq3A}$$

Substitute \eqref{eq3A} into \eqref{eq2A}, rearrange and factor to get

$$y - y_0 = \left(x - x_0\right)\tan(\theta) \tag{4}\label{eq4A}$$

This equation indicates $\theta$ is the angle, relative to the positive $x$-axis, of the line through the ellipse center.

At the intersection points (note there will be $2$ of them), the values of $x$ and $y$ will need to satisfy both \eqref{eq1A} and \eqref{eq4A} simultaneously. To determine their values, substitute \eqref{eq4A} into \eqref{eq1A} to get

\begin{align} 1 & = \frac{(x-x_{0})^2}{a^2} + \frac{\left((x-x_{0})\tan(\theta)\right)^2}{b^2} \\ & = (x-x_{0})^2\left(\frac{1}{a^2} + \frac{\tan^2(\theta)}{b^2}\right) \\ & = (x-x_{0})^2\left(\frac{b^2 + a^2\tan^2(\theta)}{a^2 b^2}\right) \tag{5}\label{eq5A} \end{align}

To make the handling a bit simpler, let

$$k = \frac{a^2 b^2}{b^2 + a^2\tan^2(\theta)} \tag{6}\label{eq6A}$$

since $k$ is a constant value. Next, multiplying both sides in \eqref{eq5A} by $k$ and then taking square roots gives

$$x - x_0 = \pm\sqrt{k} \;\;\to\;\; x = x_0 \pm\sqrt{k} \tag{7}\label{eq7A}$$

Substituting \eqref{eq7A} into \eqref{eq4A} then results in

$$y - y_0 = \pm \sqrt{k} \tan(\theta) \;\;\to\;\; y = y_0 \pm \sqrt{k} \tan(\theta) \tag{8}\label{eq8A}$$

Thus, the $2$ points of intersection between the line and the ellipse are $\left(x_0 + \sqrt{k}, y_0 + \sqrt{k} \tan(\theta)\right)$ and $\left(x_0 - \sqrt{k}, y_0 - \sqrt{k} \tan(\theta)\right)$.