Calculating a Point that lies on an Ellipse given an Angle

66.8k Views Asked by At

I need to find a point (A on this diagram) given the center point of the ellipse as well as an angle. I've been melting my brain all day (as well as searching through questions here) testing out different equations. What's the best way to do this?

enter image description here

I intend to grab point A at $225^o$ as well as another point at approximately $250^o$ using the same math. These need to be fetched regardless of elliptic width and height.

3

There are 3 best solutions below

5
On BEST ANSWER

If the ellipse is centered at the origin, the equation of the ellipse is $\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$. The equation of the line is $y=x\tan \theta $ So you have $\frac{x^2}{a^2}+\frac{(x\tan \theta )^2}{b^2}=1$ or $x=\pm \frac{ab}{\sqrt{b^2+a^2(\tan \theta)^2}}$ where the sign is + if $ -\pi/2 \lt \theta \lt \pi/2$

5
On

If the ellipse is centered at $(0,0)$, $2a$ wide in the $x$-direction, $2b$ tall in the $y$-direction, and the angle you want is $\theta$ from the positive $x$-axis, the coordinates of the point of intersection are $$\left(\frac{a b}{\sqrt{b^2+a^2\tan^2(\theta)}},\frac{a b \tan(\theta)}{\sqrt{b^2 + a^2\tan^2(\theta)}}\right) \text{ if }0\le\theta< 90°\text{ or }270°<\theta\le360°$$ or $$\left(-\frac{a b}{\sqrt{b^2+a^2\tan^2(\theta)}},-\frac{a b \tan(\theta)}{\sqrt{b^2 + a^2\tan^2(\theta)}}\right) \text{ if }90°<\theta< 270°.$$

0
On

I think there might be an alternative that doesn't need to define a piecewise function and we don't have problems in handling some angles:

$x(\theta) = r(\theta)cos(\theta)$
$y(\theta) =r(\theta)sin(\theta)$

where $r(\theta)$ is the radius of the ellipse given $\theta$ and is given by $r(\theta)=\frac{ab}{\sqrt{a^2sin^2(\theta)+b^2cos^2(\theta)}}$, see here.

N.B.: This works as well for an ellipse tilded by an angle of $\phi$ and the parametrisation is

$\begin{bmatrix}x(\theta)\\y(\theta)\end{bmatrix} = \begin{bmatrix}cos(\phi)&-sin(\phi)\\sin(\phi)&cos(\phi)\end{bmatrix}\begin{bmatrix}r(\theta-\phi)cos(\theta-\phi)\\r(\theta-\phi)sin(\theta-\phi)\end{bmatrix}$