Jump to content

Line–sphere intersection

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 91.80.68.38 (talk) at 21:48, 26 May 2025 (Calculation using vectors in 3D). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
The three possible line-sphere intersections:
1. No intersection.
2. Point intersection.
3. Two point intersection.

In analytic geometry, a line and a sphere can intersect in three ways:

  1. No intersection at all
  2. Intersection in exactly one point
  3. Intersection in two points.

Methods for distinguishing these cases, and determining the coordinates for the points in the latter cases, are useful in a number of circumstances. For example, it is a common calculation to perform during ray tracing.[1]

wo points (case 3).

See also

References

  1. ^ 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.