Finding a point in an ellipsoid I know the semi-principal axes $(x,y,z)$ of the ellipsoid $E$ (centered at the origin). Given the normalized direction vector $\vec{v}=(a,b,c)$ pointing from the origin to the surface, how can I find the factor $f$ so that $f\vec{v} \in E$?

The ellipsoid $E$ is the locus of points $(x, y, z) \in \mathbb{R}^3$ satisfying
$$
\frac{x^2}{r^2} + \frac{y^2}{s^2} + \frac{z^2}{t^2} = 1
$$
If $\vec{v} = (a, b, c)$ and $f\vec{v} \in E$ with $f \in \mathbb{R}$, then we can find the scalar $f$ by putting the coordinates of $f\vec{v}$ into the equation.
$$
f\vec{v} = (fa, fb, fc)
$$
Now,
$$
\begin{align}
1 &= \frac{(fa)^2}{r^2} + \frac{(fb)^2}{s^2} + \frac{(fc)^2}{t^2} \\
&= \left( \frac{a^2}{r^2} + \frac{b^2}{s^2} + \frac{c^2}{t^2} \right)f^2.
\end{align}
$$
Therefore,
$$
f = \pm \sqrt{\left( \frac{a^2}{r^2} + \frac{b^2}{s^2} + \frac{c^2}{t^2} \right)^{-1}}.
$$
