# Standard equation of an ellipse given both foci

I want to find the standard equation of an ellipse $$E$$ given its two foci points $$p_1=(x_1, y_1)$$ and $$p_2=(x_2,y_2)$$. My ellipse is shifted in the x and y-direction to a new center point $$(x_e,y_e)$$. Note that the points $$p_1$$ and $$p_2$$ are aligned so that the ellipse will be rotated by some angle $$\theta$$. I know the standard equation for an ellipse that is aligned with the x axis and is centered at $$(0,0)$$ is $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$

I searched the internet for a broader definition that does include shifting, rotation, and does only use the coordinates of the points $$p_1$$ and $$p_2$$ and some distance $$c$$ so that every point $$q$$ on the border of the ellipse is of distance $$c=|p_1q| + |p_2q|$$ to $$q$$. I was surprised that I did not find any. Can you help me out?

Edit

From what I am understanding I can calculate the major/minor axis $$a,b$$ as follows:

$$a=\frac{1}{2}c$$ $$b=\sqrt{a^2-f^2}$$

Where $$f$$ is the distance from $$(x_e,y_e)$$ to the focus point $$p_1$$: $$f=\sqrt{(p_1^x-x_e)^2+(p_1^y-y_e)^2}$$

I also found that the standard form of an ellipse that is rotated by an angle $$\theta$$ from the x-axis is

$$\frac{(x\cos{\theta}+y\sin{\theta})^2}{a^2}+\frac{(x\sin{\theta}-y\cos{\theta})^2}{b^2}=1$$

However, this representation does not include the shift to the new center point $$(x_e,y_e)$$ and I am not sure if the equations for $$a,b$$ hold for the rotated ellipse case.

• Explained many places, such as: en.wikipedia.org/wiki/Ellipse Dec 28 '20 at 22:54
• @user isn't the distance $c$ from my question enough to calculate the axis using the distance from the center to either $p_1$ or $p_2$ and $c$? Dec 28 '20 at 23:03
• No. There are an infinite number of ellipses with given pair of foci. You must also know the distance to the ellipses. Dec 28 '20 at 23:05
• @DavidG.Stork My question contains the following sentence "[...] and some distance $c$ so that every point $q$ on the border of the ellipse is of distance $c=|p_1q|+|p_2q|$ to $q$." Isn't that the distance you are talking about? Dec 28 '20 at 23:07
• @DavidG.Stork I did not find a formula of the form I described in my question that does only depend on the cartesian coordinates of $p_1$ and $p_2$ Dec 28 '20 at 23:09

There is a general equation of an ellipse so that every point $$(x,y)$$ implicitly satisfies a quadric as was mentioned in the comments. However, in my specific use case, I can substitute $$(x-x_e)$$ and $$(y-y_e)$$ in the formula that I posted in the original question. Again, thanks for the useful comments on this. I conclude the following general form of an ellipse using only the points $$p_1,p_2$$ the angle $$\theta$$ (which can be derived from $$p_1p_2$$) and the distance $$c$$.

Start by calculating the minor/major as already suggested in the question $$a=\frac{1}{2}c$$ $$b=\sqrt{a^2-f^2}$$

Where $$f$$ is the distance from $$(x_e,y_e)$$ to the focus point $$p_1$$: $$f=\sqrt{(p_1^x-x_e)^2+(p_1^y-y_e)^2}$$

Now the general form for all points $$(x,y)$$ on the ellipse satisfies the following equation $$\dfrac {((x-x_e)\cos(\theta)+(y-y_e)\sin(\theta))^2}{a^2}+\dfrac{((x-x_e) \sin(\theta)-(y-y_e) \cos(\theta))^2}{b^2}=1$$