Definitions
Nearby Words

Line-plane intersection

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, for example, in computer graphics, motion planning, and collision detection.

Parametric form

A line is described by all points that are a given direction from a point. Thus a line can be represented as

$mathbf\left\{l\right\}_a + \left(mathbf\left\{l\right\}_b - mathbf\left\{l\right\}_a\right)t, quad tin mathbb\left\{R\right\},$

where $mathbf\left\{l\right\}_a=\left(x_a, y_a, z_a\right)$ and $mathbf\left\{l\right\}_b=\left(x_b, y_b, z_b\right)$ are two distinct points along the line.

Similarly a plane can be represented as

$mathbf\left\{p\right\}_0 + \left(mathbf\left\{p\right\}_1-mathbf\left\{p\right\}_0\right)u + \left(mathbf\left\{p\right\}_2-mathbf\left\{p\right\}_0\right)v, quad u,vinmathbb\left\{R\right\}$

where $mathbf\left\{p\right\}_k=\left(x_k,y_k,z_k\right)$, $k=0,1,2$ 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 line equal to the plane in the parametric equation:

$mathbf\left\{l\right\}_a + \left(mathbf\left\{l\right\}_b - mathbf\left\{l\right\}_a\right)t = mathbf\left\{p\right\}_0 + \left(mathbf\left\{p\right\}_1-mathbf\left\{p\right\}_0\right)u + \left(mathbf\left\{p\right\}_2-mathbf\left\{p\right\}_0\right)v$
This can be simplified to
$mathbf\left\{l\right\}_a - mathbf\left\{p\right\}_0 = \left(mathbf\left\{l\right\}_a - mathbf\left\{l\right\}_b\right)t + \left(mathbf\left\{p\right\}_1-mathbf\left\{p\right\}_0\right)u + \left(mathbf\left\{p\right\}_2-mathbf\left\{p\right\}_0\right)v,$
which can be expressed in matrix form as:
$begin\left\{bmatrix\right\} x_a - x_0 y_a - y_0 z_a - z_0 end\left\{bmatrix\right\} = begin\left\{bmatrix\right\} x_a - x_b & x_1 - x_0 & x_2 - x_0 y_a - y_b & y_1 - y_0 & y_2 - y_0 z_a - z_b & z_1 - z_0 & z_2 - z_0 end\left\{bmatrix\right\} begin\left\{bmatrix\right\} t u v end\left\{bmatrix\right\}$

The point of intersection is then equal to

$mathbf\left\{l\right\}_a + \left(mathbf\left\{l\right\}_b - mathbf\left\{l\right\}_a\right)t$

If the line is parallel to the plane then the vectors $mathbf\left\{l\right\}_b - mathbf\left\{l\right\}_a$, $mathbf\left\{p\right\}_1-mathbf\left\{p\right\}_0$, and $mathbf\left\{p\right\}_2-mathbf\left\{p\right\}_0$ 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 $t in \left[0,1\right],$, then the intersection point is on the line between $mathbf\left\{l\right\}_a$ and $mathbf\left\{l\right\}_b$.

If the solution satisfies

$u,v in \left[0,1\right], ;;; \left(u+v\right) leq 1,$
then the intersection point is in the plane inside the triangle spanned by the three points $mathbf\left\{p\right\}_0$, $mathbf\left\{p\right\}_1$ and $mathbf\left\{p\right\}_2$.

This problem is typically solved by expressing it in matrix form, and inverting it:

$begin\left\{bmatrix\right\} t u v end\left\{bmatrix\right\} = begin\left\{bmatrix\right\} x_a - x_b & x_1 - x_0 & x_2 - x_0 y_a - y_b & y_1 - y_0 & y_2 - y_0 z_a - z_b & z_1 - z_0 & z_2 - z_0 end\left\{bmatrix\right\}^\left\{-1\right\} begin\left\{bmatrix\right\} x_a - x_0 y_a - y_0 z_a - z_0 end\left\{bmatrix\right\}.$

Algebraic form

The plane can also be defined by
$mathbf\left\{p\right\}cdotmathbf\left\{n\right\}=d$
where $mathbf\left\{p\right\}=\left(x,y,z\right)$ is a point on the plane and $mathbf\left\{n\right\}$ is a normal to the plane. A normal can be found by taking the cross product $\left(mathbf\left\{p\right\}_1-mathbf\left\{p\right\}_0\right) times \left(mathbf\left\{p\right\}_2 - mathbf\left\{p\right\}_0\right)$ and $d=mathbf\left\{p\right\}_0cdotmathbf\left\{n\right\}$.

Combining with the equation for the line gives

$\left(mathbf\left\{l\right\}_a+t\left(mathbf\left\{l\right\}_b-mathbf\left\{l\right\}_a\right)\right)cdotmathbf\left\{n\right\}=d,$
and
$t=\left\{d-mathbf\left\{l\right\}_acdotmathbf\left\{n\right\} over \left(mathbf\left\{l\right\}_b-mathbf\left\{l\right\}_a\right)cdotmathbf\left\{n\right\}\right\}.$

In term of coordinates, if $mathbf\left\{n\right\}=\left(a,b,c\right)$ then the equation of the plane is

$a x+b y+c z=d$
and
$t=\left\{d-a x_a - b y_a - c z_a over a \left(x_b-x_a\right)+ b \left(y_b-y_a\right) + c\left(z_b-z_a\right)\right\}.$

If the direction of the line $\left(mathbf\left\{l\right\}_b-mathbf\left\{l\right\}_a\right)$ is perpendicular to the normal then the denominator will be zero. If the line lies in the plane then both numerator and denominator will be zero, the equation is satisfied by all values of t.

Uses

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.

The algorithm can be generalised to cover intersection with other planar figures, in particular, the intersection of a polyhedron with a line.

Search another word or see Line-plane intersectionon Dictionary | Thesaurus |Spanish