Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
up vote 8 down vote accepted

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=\tan \theta x$ So you have $\frac{x^2}{a^2}+\frac{(\tan \theta x)^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$

share|cite|improve this answer
Well, this is embarrassing. The code I was working with already fetches the exact same value this does. I was sure my math was wrong. It looks like I'll have to figure out how to handle this data in Flash given its wonky co-ordinate system. Regardless, thanks for the quick answer. – null Feb 14 '11 at 23:53
Similarly for y: $y=\pm \frac{ab}{\sqrt{a^2+\frac{b^2}{(\tan \theta)^2}}}$ – Charles L. Jul 25 '14 at 0:25
@CharlesL. : why would you get y like that instead of simply $y=\sqrt{ 1-(x/a)^2 } * b$ if you have x already? – B M Oct 16 '15 at 14:17

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°.$$

share|cite|improve this answer
Doesn't $\tan$ become negative for $\theta \gt 90^{\circ}$ so the signs are flipped over $90^{\circ}$ to $270^{\circ}$ – Ross Millikan Feb 14 '11 at 23:36
@Ross: I think I've got the signs and ranges right now (perhaps you were looking at my initial post with incorrect ranges). For example, between 90° and 180°, using the second formula and tangent is negative, the $x$-coordinate is negative and the $y$ coordinate is positive (opposite of the negative tangent), which is correct for angles between 90° and 180°. – Isaac Feb 14 '11 at 23:43
Looks good to me – Ross Millikan Feb 15 '11 at 1:20

You can also use parametric equations:

$$x=a\cos(\theta)$$ $$y=b\sin(\theta)$$

Where $a$ is the radius on the horizontal axis, and $b$ is the radius on the vertical axis.

share|cite|improve this answer
In this parametrization, $\theta$ is not the angle of the post, for example for $\theta=225$ of the diagram the corresponding point on the ellipse is not given by your formulas. – coffeemath May 19 '13 at 17:28
@coffeemath Why wouldn't $x = a\cos(225°)$ and $y=b\sin(225°)$ work? – Ataraxia May 19 '13 at 17:33
@Zettasurro -- those equations will give you a point on the ellipse. But the polar angle of this point will not be 225 degrees. – bubba May 19 '13 at 23:28
@Zettasurro The angle from the point you mention in your comment would have tangent equal to $(b/a)\tan(225)$, and so would not be 225 degrees unless $a=b$ (the ellipse is a circle). – coffeemath May 20 '13 at 1:05
@coffeemath Why is that a problem? Since it's not a circle, doesn't it make sense for the slope of the tangent not to equal $\tan(225)$? – Ataraxia May 20 '13 at 1:11

The equation of an ellipse in its origin centered form is:

$(\frac{cos \theta} {a})^2 + (\frac{sin \theta} {b})^2=(\frac{1}{ r})^2 $.

Hope you take it from there.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.