- Plane–sphere intersection
1. No intersection.
2. Point intersection.
3. Circle intersection.In the theory ofanalytic geometry for real three-dimensional space, the
intersection of a
plane and asphere can be theempty set , a point, or acircle .Distinguishing these cases, and determining equationsfor the point and circle in the latter cases have use,for example, when calculating ray intersections in ray tracing.For convenience in analysis, choose a
coordinate system that places the center of the sphere at the origin; this can be accomplished by a translation. Thus the implicit equation for the sphere becomes:
Points on the plane may be described in one of two ways; both have benefits. An implicit equation for the plane is
:
Scale the coefficients, if necessary, so that "a"2+"b"2+"c"2 is normalized to 1 and "d" is non-negative (which we can always do); then "d" gives the minimum distance from the plane to the origin. Thus we have
* if "d" > "r", no intersection;
* if "d" = "r", a single point of intersection, at ("da","db","dc");
* if "d" < "r", a circle of intersection, with center ("da","db","dc") and squared radius "r"2−"d"2.A parametric equation for the plane yields the most convenient equation for the circle. (An implicit form requires two equations, so this does not reduce the dimensionality.) We write this in terms of a known point "P" of the plane, which we may take to be ("da","db","dc"), and two independent vectors in the plane, v1 and v2.
:
Among "a", "b", and "c", suppose "c" has the largest magnitude. (This is a safety precaution.) Then we may take v1 to be (0,"c",−"b") and v2 to be ("c",0,−"a"), because the vector from the origin to ("a","b","c") is perpendicular to the plane. Although these vectors span the plane, we cannot expect them to have unit magnitude nor to be perpendicular to each other. To convert them to an
orthonormal basis , we can use theGram-Schmidt process . Easier still is to scale v1 to unit length (dividing by (1−"a"2)1/2), then to generate v2 as the cross product of this and the plane normal, ("a","b","c"). Either way, setting:with:in the Point equation, we obtain a parametric equation for the circle in terms of θ. Alternatively, rotate the coordinate system so that the circle center lies on the "z" axis, at (0,0,"d"), then write the circle as:This variation is convenient for analysis, but more expensive in applications.ee also
*
Analytic geometry
*Line-plane intersection
*Line of intersection between two planes
*Line–sphere intersection
Wikimedia Foundation. 2010.