<s>[INST] Parametric form of an ellipse given by $ax^2 + by^2 + cxy = d$ If $c = 0$, the parametric form is obviously $x = \sqrt{\frac{d}{a}} \cos(t), y = \sqrt{\frac{d}{b}} \sin(t)$.
When $c \neq 0$ the sine and cosine should be phase shifted from each other.  How do I find the angular shift and from there how do I adjust the factors multiplying the sine and cosine?
 [/INST] If the parametric ellipse coordinates are $\left(x(t),y(t)\right) = (X \cos\varphi \cos(t)-Y \sin\varphi \sin(t), Y \cos\varphi \sin(t)+X \sin\varphi \cos(t)) $
Then the parameters $ X,Y,\varphi $ are
$$ X =\pm \sqrt{\frac{2 d}{a+b+\sqrt{(a-b)^2+c^2}}} $$
$$ Y =\pm \sqrt{\frac{2 d}{a+b-\sqrt{(a-b)^2+c^2}}} $$
$$ \varphi = \frac{1}{2}\tan^{-1}\left(\frac{c}{a-b}\right) $$
Example:
$10 x^2+20 y^2-18 x y = 100$
The coefficients are ($a=10$, $b=20$, $c=-18$, $d=100$)

The parametric coefficients are
$(-1.008311 \cos(t)+3.973667 \sin(t), 1.713639 \cos(t)+2.338119 \sin(t))$

</s>