|This article does not cite any references or sources. (December 2009)|
In analytic geometry, the intersection of a line and a plane can be the empty set, a point, or a line. Distinguishing these cases, and determining equations for the point and line in the latter cases, have use in computer graphics, motion planning, and collision detection.
In vector notation, a plane can be expressed as the set of points for which
where is a vector in the direction of the line, is a point on the line, and is a scalar in the real number domain. Substitute the equation for the line into the equation for the plane gives
And solve for
If then the line and plane are parallel. There will be two cases if then the line is contained inside the plane, the line intersects the plane everywhere. Otherwise the line and plane have no intersection.
If there is a single point of intersection. The value of can be calculated and the point of intersection is given by
A line is described by all points that are a given direction from a point. Thus a general point on a line can be represented as
where and are two distinct points along the line.
Similarly a general point on a plane can be represented as
where , are three points in the plane which are not co-linear.
The point at which the line intersects the plane is therefore described by setting the point on the line equal to the point on the plane, giving the parametric equation:
This can be rewritten as
which can be expressed in matrix form as:
The point of intersection is then equal to
If the line is parallel to the plane then the vectors , , and will be linearly dependent and the matrix will be singular. This situation will also occur when the line lies in the plane.
If the solution satisfies the condition , then the intersection point is on the line between and .
If the solution satisfies
then the intersection point is in the plane inside the triangle spanned by the three points , and .
This problem is typically solved by expressing it in matrix form, and inverting it:
In the ray tracing method of computer graphics a surface can be represented as a set of pieces of planes. The intersection of a ray of light with each plane is used to produce an image of the surface. In vision-based 3D reconstruction, a subfield of computer vision, depth values are commonly measured by so-called triangulation method, which finds the intersection between light plane and ray reflected toward camera.
The algorithm can be generalised to cover intersection with other planar figures, in particular, the intersection of a polyhedron with a line.
- Plücker coordinates#Plane-line meet calculating the intersection when the line is expressed by Plücker coordinates.