Calculations for a ray–sphere intersection using algebra and the quadratic equation. One application of this is the calculation of ray intersections in ray tracing.
Equation for a sphere
Equation for a line starting at (0,0,0)
Solving for :
If only the fact of if the ray and sphere intersect is needed:
The above is true if the line and sphere intersect.
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Line–sphere intersection".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world