Line–sphere intersection

Line–sphere intersection


thumb|350px|right|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: no intersection at all, at exactly one point, or in two points. Methods for distinguishing these cases, and determining equations for the points in the latter cases, are useful in a number of circumstances. For example, this is a common calculation to perform during ray tracing.

In vector notation, the equations are as follows:

Equation for a sphere:leftVert mathbf{x} - mathbf{c} ightVert^2=r^2:*mathbf{c} - center point:*r - radius

Equation for a line starting at (0,0,0):mathbf{x}=dmathbf{l}:*d - distance along line from starting point:*mathbf{l} - direction of line (a unit vector)

Solving for d:

:Equations combined::leftVert dmathbf{l}-mathbf{c} ightVert^2=r^2:Expanded::d^2mathbf{l}^2-2d(mathbf{l}cdotmathbf{c})+mathbf{c}^2=r^2:Rearranged::d^2mathbf{l}^2-2d(mathbf{l}cdotmathbf{c})+mathbf{c}^2-r^2=0:Quadratic formula and simplified. (This quadratic equation is an example of Joachimsthal's Equation).::d=frac{(mathbf{l}cdotmathbf{c}) pm sqrt{(mathbf{l}cdotmathbf{c})^2-mathbf{l}^2(mathbf{c}^2-r^2){mathbf{l}^2}:Note that mathbf{l} is a unit vector, and thus mathbf{l}^2=1. Thus, we can simplify this further to::d=(mathbf{l}cdotmathbf{c}) pm sqrt{(mathbf{l}cdotmathbf{c})^2-mathbf{c}^2+r^2}

*If the value under the square-root ((mathbf{l}cdotmathbf{c})^2-mathbf{c}^2+r^2) is less than zero, then it is clear that no solutions exist, i.e. the line does not intersect the sphere (case 1).
*If it is zero, then exactly one solution exists, i.e. the line just touches the sphere in one point (case 2).
*If it is greater than zero, two solutions exist, and thus the line touches the sphere in two points (case 3).

ee also

*Analytic geometry
*Line-plane intersection
*Line of intersection between two planes


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Plane–sphere intersection — 1. No intersection. 2. Point intersection. 3. Circle intersection.In the theory of analytic geometry for real three dimensional space, the intersection of a plane and a sphere can be the empty set, a point, or a circle.Distinguishing these cases …   Wikipedia

  • Intersection — has various meanings in different contexts: *In mathematics and geometry **Intersection (set theory), the set of elements common to some collection of sets. **Line line intersection **Line plane intersection **Line–sphere intersection… …   Wikipedia

  • Sphere — Globose redirects here. See also Globose nucleus. A sphere (from Greek σφαίρα sphaira , globe, ball, [ [http://www.perseus.tufts.edu/cgi bin/ptext?doc=Perseus%3Atext%3A1999.04.0057%3Aentry%3D%23101561 Sphaira, Henry George Liddell, Robert Scott,… …   Wikipedia

  • sphere — sphereless, adj. spherelike, adj. /sfear/, n., v., sphered, sphering. n. 1. Geom. a. a solid geometric figure generated by the revolution of a semicircle about its diameter; a round body whose surface is at all points equidistant from the center …   Universalium

  • Lie sphere geometry — is a geometrical theory of planar or spatial geometry in which the fundamental concept is the circle or sphere. It was introduced by Sophus Lie in the nineteenth century. [The definitive modern textbook on Lie sphere geometry is Harvnb|Cecil|1992 …   Wikipedia

  • Ground line — ground ground (ground), n. [OE. ground, grund, AS. grund; akin to D. grond, OS., G., Sw., & Dan. grund, Icel. grunnr bottom, Goth. grundus (in composition); perh. orig. meaning, dust, gravel, and if so perh. akin to E. grind.] 1. The surface of… …   The Collaborative International Dictionary of English

  • 3-sphere — Stereographic projection of the hypersphere s parallels (red), meridians (blue) and hypermeridians (green). Because this projection is conformal, the curves intersect each other orthogonally (in the yellow points) as in 4D. All curves are circles …   Wikipedia

  • Homology sphere — In algebraic topology, a homology sphere is an n manifold X having the homology groups of an n sphere, for some integer n ≥ 1. That is, we have: H 0( X ,Z) = Z = H n ( X ,Z)and : H i ( X ,Z) = {0} for all other i .Therefore X is a connected space …   Wikipedia

  • Armillary sphere — An armillary sphere (variations are known as spherical astrolabe, armilla, or armil) is a model of the celestial sphere. Description and use of the armillary sphere The exterior parts of this machine are a compages of brass rings, which represent …   Wikipedia

  • Ley line — Ley lines are hypothetical alignments of a number of places of geographical interest, such as ancient monuments and megaliths. Their existence was suggested in 1921 by the amateur archaeologist Alfred Watkins, whose book The Old Straight Track… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”