# How to find the center of an Ellipse, given a focal point, radius, and eccentricity

I am attempting to create a small computer simulation with planetary orbits.

Calculating the position a planet has on its orbit at a certain time works fine. However, I now want to draw their orbits as well.

The problem is, that to draw an Ellipse in most computer programs, I need to specify the center (x,y) coordinates as well as a width and a height. However, the only information I have available is the following;

• The (x,y) coordinates of one of the focal points $f$, as this is the position the planet revolves around.
• The size of the semi-mayor axis $a$ of the ellipse.
• The eccentricity $\epsilon$ of the ellipse.

(Also, it is presumed that the semi-mayor axis is parallel to the x-axis.)

How can this information be used to calculate the (x,y) position of the center of the ellipse?

• en.wikipedia.org/wiki/Ellipse – amd Jan 8 '16 at 22:22
• @amd thank you for pointing to Wikipedia, but I would not have asked this question if I had been able to find an answer there. – Qqwy Jan 8 '16 at 22:31
• $\epsilon=c/a$, where $c$ is the distance from one focus to the center. – Intelligenti pauca Jan 8 '16 at 22:36
• More specifically, en.wikipedia.org/wiki/Ellipse#Eccentricity, which gives you the same relationship between eccentricity, focal distance and semi-major axis as in Aretino’s comment. – amd Jan 8 '16 at 22:47
• Be careful with your terminology. A focal point is different to a focus. For a curve (without inflexions) every point on the curve has a corresponding focal point (the centre of of osculating circle), and so the focal points trace out a new curve called the evolute. Only ellipses, hyperbolae and parabolae have foci, and they are isolated points. – Fly by Night Jan 9 '16 at 1:14

$$\epsilon=\dots=f/a$$ (where again $a$ and $b$ are one-half of the ellipse's major and minor axes respectively, and $f$ is the focal distance)
So you know $\epsilon$ and $a$, you can compute $f$ and that's the distance between focus and center. If the term “focal distance” isn't clear enough (it could be the distance between the foci, after all), the images on Wikipedia make it clear that this is the distance you need, between center and focus. If you also know the direction, you can just move that distance in the given direction. However, your specification doesn't tell us whether you should move in the positive or the negative $x$ direction. But perhaps you know which.