I have a sphere which is originated at:
$$ \begin{matrix} 0 & 0 & 0 \end{matrix} $$
Its radius r is 150. I have a line which goes from: $$ \begin{matrix} 0 & 0 & 0 \end{matrix} $$
and passes through the point inside a sphere [x y z]. Knowing that line starts from origin and crosses [x y z], how to find out at what coordinates line will intersect with the sphere?
The line consists of the points $[\lambda x,\lambda y,\lambda z]$ with $\lambda\in\Bbb{R}$. The sphere consists of the points $[u,v,w]$ with $$u^2+v^2+w^2=150^2.$$ So the points of intersection are the points $[\lambda x,\lambda y,\lambda z]$ with $\lambda\in\Bbb{R}$ such that $$(\lambda x)^2+(\lambda y)^2+(\lambda z)^2=150^2.$$ It is not hard to see that the appropriate values for $\lambda$ are $$\lambda=\pm\sqrt{\frac{150^2}{x^2+y^2+z^2}}=\pm\frac{150}{\sqrt{x^2+y^2+z^2}}.$$