Creating an ellipse passing through a rectangle's vertices coordinates Given a rectangle with vertices $A(x_1, y_1), B(x_2, y_2), C(x_3, y_3)$ and $D(x_4, y_4)$, how to create an ellipse with this vertices coordinates?

 A: There are actually an infinite number of such ellipses.
To simplify matters slightly, lets move the origin to the centre of the rectangle, and take the points $(\pm p, \pm q)$ to be the vertices. The equation of an ellipse passing through the vertices is given by 
$$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$$
It is clear that any such ellipse passing through $(p,q)$ will automatically pass through all 4 vertices.
So we need $$\frac{p^2}{a^2} + \frac{q^2}{b^2} = 1$$
from which we get
$$a^2 = \frac{b^2p^2}{b^2-q^2}$$
so that if we take any value for $b>q$ (to ensure the expression for $a^2$ is positive) then the corresponding $a$ value will give a solution to your problem.
Edit:
As an extra, you can see that if we take $a = \sqrt{p^2+q^2}$, then $b$ has the same value, so that exactly one of the ellipses satisfying your conditions is actually a circle.
A: Assume the sides of the given rectangle are parallel with the coordinate axis (if no, you can rotate this). Then, the ellipse with this vertices is given by $\frac {(x-h)^2}{a^2}+\frac {(x-k)^2}{b^2}=1$. The points $(h,k)$ is obvious the center of the rectangle. And to find $a$ and $b$ you can substitute $(x_1,y_1)$ and $(x_2,y_2)$ to the equation.
