I would need to calculate the formula to generate the conic passing through $5$ coplanar points in space.
I know this question could be long and boring, in fact I was hoping to find some "smart" method to solve it rather than wasting hours of calculation. Since the solution is a parametric equation the question can be simplified as "what is the parametric equation of a conic passing through 5 points in the plane?" (the condition that the $5$ points are coplanar is automatically respected by rotating and translating the solution).
I know there is this formula: $${\displaystyle \det {\begin{bmatrix}x^{2}&xy&y^{2}&x&y&1\\x_{1}^{2}&x_{1}y_{1}&y_{1}^{2}&x_{1}&y_{1}&1\\x_{2}^{2}&x_{2}y_{2}&y_{2}^{2}&x_{2}&y_{2}&1\\x_{3}^{2}&x_{3}y_{3}&y_{3}^{2}&x_{3}&y_{3}&1\\x_{4}^{2}&x_{4}y_{4}&y_{4}^{2}&x_{4}&y_{4}&1\\x_{5}^{2}&x_{5}y_{5}&y_{5}^{2}&x_{5}&y_{5}&1\end{bmatrix}}=0}$$
is there a way to transform it into parametric form?
Something like: $$\Gamma(t): (x_0,y_0)+(a_1\cos(t)+b_1\sin(t),a_2\cos(t)+b_2\sin(t))$$
I know that given a conic of the form: $$\Gamma(x,y): ax^2+2bxy+cy^2+2dx+2ey+f=0$$ the center and angle of rotation are: $$\mathbf{C}=\left(\frac{cd-be}{b^2-ac^2},\frac{ae-bd}{b^2-ac}\right)\qquad \theta=\frac{1}{2}\arctan(2b,a-c)$$ and the conic form is $$\lambda_1 x^2+\lambda_2 y^2=-\frac{\det(\mathbf{A})}{\det(\mathbf{B})}$$ Where $\mathbf{A}$ and $\mathbf{B}$ are the matrices referred to the conic in matrix form and $\lambda_{1,2}$ are the eigenvalues of matrix $\mathbf{B}$.
Honestly I would like to avoid developing the determinant of a $6\times 6$ matrix and calculating this type of formula. Literally the "brute" method would be:
- Calculate the determinant of the $6\times 6$ matrix;
- Take the coefficients $a$, $b$, $c$, $d$ and $e$;
- Calculate the eigenvalues of $\mathbf{B}$ to transform it into canonical form;
- Transform the canonical form into parametric form: $(x,y)=(\cos(t),\sin(t))$ or $(x,y)=(\cosh(t), \sinh(t))$;
- Apply the inverse rototranslation (of vector $\mathbf{C}$ and angle $\theta$) to obtain the starting conic.