We want to find the intersection of an ellipsoid and a parabola in 3d, but cannot find a solution. We looked at Line-Ellipsoid-Intersection, tried to do the same with a parabola instead of a line and computed the approximate root with Newton-Raphson-method, but the result seems wrong.
Is there a better way to compute the intersection between an ellipsoid and a parabola in 3d?
We use the following ellispoid and parabola for testing:
Translate the ellipsoid to origin, and rotate it so that its axes match the coordinate axes, and you can describe it as $$\frac{x^2}{r_x^2} + \frac{y^2}{r_y^2} + \frac{z^2}{r_z^2} = 1 \tag{1}\label{G1}$$ Apply the same translation and rotation to the parabola, and parametrise it using a free variable, say $t$: $$\left\lbrace\begin{aligned} x &= x_0 + x_1 t + x_2 t^2 \\ y &= y_0 + y_1 t + y_2 t^2 \\ z &= z_0 + z_1 t + z_2 t^2 \\ \end{aligned}\right . \tag{2}\label{G2}$$ Substituting $\eqref{G2}$ into $\eqref{G1}$ gives you a quartic equation, $$T_0 + T_1 t + T_2 t^2 + T_3 t^3 + T_4 t^4 = 0 \tag{3a}\label{G3a}$$ where $$\begin{aligned} T_0 &= \displaystyle \frac{x_0^2}{r_x^2} + \frac{y_0^2}{r_y^2} + \frac{z_0^2}{r_z^2} \\ T_1 &= \displaystyle \frac{2 x_0 x_1}{r_x^2} + \frac{2 y_0 y_1}{r_y^2} + \frac{2 z_0 z_1}{r_z^2} \\ T_2 &= \displaystyle \frac{2 x_0 x_2 + x_1^2}{r_x^2} + \frac{2 y_0 y_2 + y_1^2}{r_y^2} + \frac{2 z_0 z_2 + z_1^2}{r_z^2} \\ T_3 &= \displaystyle \frac{2 x_1 x_2}{r_x^2} + \frac{2 y_1 y_2}{r_y^2} + \frac{2 z_1 z_2}{r_z^2} \\ T_4 &= \displaystyle \frac{x_2^2}{r_x^2} + \frac{y_2^2}{r_y^2} + \frac{z_2^2}{r_z^2} \\ \end{aligned} \tag{3b}\label{G3b}$$ Note that only real solutions $t$ are interesting here, because only those describe points $x(t), y(t), z(t)$ on the parabola.
This does have an analytic solution for up to four real roots $t$ that you can find, say using a computer algebra system such as wxMaxima, SageMath, or Maple, but it has too many terms to be really practical.
For numerical solutions, you can either find the roots of the quartic equation $\eqref{G3a}$, or you can use a mixed geometric approach where you first limit the possible range for $t$ based on $-r_x \le x(t) \le r_x$, $-r_y \le y(t) \le r_y$, $-r_z \le z(t) \le r_z$, and finding $t_0$ outside the ellipsoid, and $t_1$ inside the ellipsoid, and doing a binary search for the $t$ between the two. Just remember that there can be up to four intersections. This means that there can be either one continuous range of $t$ inside the ellipsoid; or two, separated by one continuous section of $t$ outside the ellipsoid.