In vector notation, the equations are as follows:
Equation for a sphere
Equation for a line starting at o {\displaystyle \mathbf {o} }
Searching for points that are on the line and on the sphere means combining the equations and solving for d {\displaystyle d} , involving the dot product of vectors:
Eberly, David H. (2006). 3D game engine design: a practical approach to real-time computer graphics, 2nd edition. Morgan Kaufmann. p. 698. ISBN 0-12-229063-1. 0-12-229063-1 ↩
"Joachimsthal's Equation". http://mathworld.wolfram.com/JoachimsthalsEquation.html ↩