Standard Form Ellipse Through Three Points and Parallel to X and Y Axes I want the general form $\frac{(x-x_0)^2}{a^2}+\frac{(y-y_0)^2}{b^2}=1$ for an ellipse with a specified eccentricity $e$ that passes through three (non-collinear) points $(x_1,y_1), (x_2, y_2), (x_3, y_3)$ and is parallel to the X and Y axes (i.e. major axis of ellipse parallel to the X axis and minor axis parallel to the Y axis).
I found this gem on Wikipedia:
$$
\frac{({\color{red}x} - x_1)({\color{red}x} - x_2) + {\color{blue}q}\;({\color{red}y} - y_1)({\color{red}y} - y_2)}
             {({\color{red}y} - y_1)({\color{red}x} - x_2) - ({\color{red}y} - y_2)({\color{red}x} - x_1)} =
        \frac{(x_3 - x_1)(x_3 - x_2) + {\color{blue}q}\;(y_3 - y_1)(y_3 - y_2)}
             {(y_3 - y_1)(x_3 - x_2) - (y_3 - y_2)(x_3 - x_1)}\ .
$$
where ${\color{blue}q} = \frac{a^2}{b^2} = \frac{1}{1 - e^2}$, which I think is supposed to work, but a) converting this equation to standard form is a bear (and maybe isn't doable?), and b) seems to introduce $xy$ terms which leads me to believe the ellipse will be tilted with respect to the X and Y axes.
Is this the right equation to be working with?  If so, is there a standard form of the equation?  Is there a different/better way to accomplish the task?
P.S. Having the standard form is pretty important: I'm going to use this with a graphics app where knowing $x_0, y_0, a,$ and $b$ is required.

Using Mathematica to do some symbol-crunching on the three-point formula, we get
(switching subscripts to $0$, $1$, $2$ to make modular arithmetic nicer):
$$\frac{(x - h)^2}{a^2m} + 
  \frac{(y - k)^2}{b^2m} = 1 \tag{$\star$}$$
where
$$\begin{align}
m & := \phantom{-}\frac {1} {4a^4 b^4 t^2}\prod_ {i = 0}^2\left (\; 
    a^2 (y_ {i + 1} - y_ {i - 1})^2 + b^2 (x_ {i + 1} - x_ {i - 1})^2 \;\right) \tag{1.m}\\[6pt]
h &:= \phantom{-}\frac {1} {2b^2t}\left (\; 
    a^2 (y_ 1 - y_ 2) (y_ 2 - y_ 0) (y_ 0 - y_ 1) + 
     b^2\sum_ {i = 0}^2 y_i (x^2 _ {i + 1} - 
         x^2 _ {i - 1})\; \right) \tag{1.h}\\[6 pt]
k &:= -\frac {1} {2a^2t}\left (\; 
    b^2 (x_ 1 - x_ 2) (x_ 2 - x_ 0) (x_ 0 - x_ 1) + 
     a^2\sum_ {i = 0}^2 x_i (y^2 _ {i + 1} - 
         y^2 _ {i - 1})\; \right) \tag{1.k}\\[6pt]
t &:= \phantom{-}\sum_{i=0}^2 \left( x_{i-1} y_{i+1} - x_{i+1} y_{i-1} \right)  \tag{1.t}
\end{align}$$
(with subscript arithmetic performed modulo $3$) and I've used $a$ and $b$ for notational balance and to add orientational flexibility. For an ellipse of eccentricity $e$ with a horizontal major axis, substitute $a\to 1$ and $b\to 1-e^2$; for a vertical major axis, substitute $a\to 1-e^2$ and $b\to 1$. $\square$
As a sanity check, one could/should verify that, when $a=b=1$ (that is, $e=0$), the above gives the equation of the circumcircle of the three given points. I'm out of time right now, so for the moment I'll leave that as an exercise to the reader.
