Standard equation of an ellipse given both foci

euclidean-geometrygeometry

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.

Best Answer

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