How to find the angle of an ellipse from the origin?

41 Views Asked by At

I have the following problem where I'm trying to place the center of the smaller black ellipse where the red diagonal line crosses the blue ellipse (where the arrow is pointing), but I've only been able to put it in $x = b\cos(\theta)$ where $b$ is the semi minor axis. I know how to calculare $y$, I just need to come up with the right $x$ for when the red diagonal line crosses the blue ellipse. How do I do that?

enter image description here

1

There are 1 best solutions below

3
On BEST ANSWER

Given the angle $\theta$ lets define the equation of a line through the origin at an angle $\theta$ from the x-axis:

$$ y = \tan(\theta) \, x $$

Let's also define your ellipse (centered at the origin) by the equation, for some constants $a$ and $b$:

$$ \frac{x^2}{a^2}+\frac{y^2}{b^2} = 1 $$

Now we have two equations of two unknowns, which we can solve. Substituting in the first equation to the second:

$$ \frac{x^2}{a^2}+\frac{\tan^2(\theta) \, x^2}{b^2} = 1 $$

Factor out the $x^2$:

$$ x^2 \left(\frac{1}{a^2} + \frac{\tan^2(\theta)}{b^2}\right) = 1 $$

Solve for $x$

$$ x = \pm \frac{1}{\sqrt{\left(\frac{1}{a^2} + \frac{\tan^2(\theta)}{b^2}\right)}} $$

Simplify a bit (by multiplying by $\frac{ab}{ab}$):

$$ x = \pm \frac{ab}{\sqrt{b^2 + a^2\tan^2(\theta)}} $$

In reality, you only care about the positive $x$, so you can drop the $\pm$.

To get $y$ you can just substitute the value you get for $x$ back into the equation for ellipse, solved for $y$:

$$ y = \pm \frac{b\sqrt{a^2 - x^2}}{a} $$