In analytic
geometry
Geometry (; ) is a branch of mathematics concerned with properties of space such as the distance, shape, size, and relative position of figures. Geometry is, along with arithmetic, one of the oldest branches of mathematics. A mathematician w ...
, the intersection of a
line and a
plane in
three-dimensional space
In geometry, a three-dimensional space (3D space, 3-space or, rarely, tri-dimensional space) is a mathematical space in which three values ('' coordinates'') are required to determine the position of a point. Most commonly, it is the three- ...
can be the
empty set
In mathematics, the empty set or void set is the unique Set (mathematics), set having no Element (mathematics), elements; its size or cardinality (count of elements in a set) is 0, zero. Some axiomatic set theories ensure that the empty set exi ...
, a
point, or a line. It is the entire line if that line is embedded in the plane, and is the empty set if the line is parallel to the plane but outside it. Otherwise, the line cuts through the plane at a single point.
Distinguishing these cases, and determining equations for the point and line in the latter cases, have use in
computer graphics
Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
,
motion planning, and
collision detection.
Algebraic form
In
vector notation, a plane can be expressed as the set of points
for which
:
where
is a
normal vector to the plane and
is a point on the plane. (The notation
denotes the
dot product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
of the vectors
and
.)
The vector equation for a line is
:
where
is a unit vector in the direction of the line,
is a point on the line, and
is a scalar in the
real number
In mathematics, a real number is a number that can be used to measure a continuous one- dimensional quantity such as a duration or temperature. Here, ''continuous'' means that pairs of values can have arbitrarily small differences. Every re ...
domain. Substituting the equation for the line into the equation for the plane gives
:
Expanding gives
:
And solving for
gives
:
If
then the line and plane are parallel. There will be two cases: if
then the line is contained in the plane, that is, the line intersects the plane at each point of the line. 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
:
.
Parametric form
A line is described by all points that are a given direction from a point. A general point on a line passing through points
and
can be represented as
:
where
is the vector pointing from
to
.
Similarly a general point on a plane determined by the triangle defined by the points
,
and
can be represented as
:
where
is the vector pointing from
to
, and
is the vector pointing from
to
.
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
:
where the vectors are written as column vectors.
This produces a
system of linear equations
In mathematics, a system of linear equations (or linear system) is a collection of two or more linear equations involving the same variable (math), variables.
For example,
: \begin
3x+2y-z=1\\
2x-2y+4z=-2\\
-x+\fracy-z=0
\end
is a system of th ...
which can be solved for
,
and
. If the solution satisfies the condition
, then the intersection point is on the line segment between
and
, otherwise it is elsewhere on the line. Likewise, if the solution satisfies
, then the intersection point is in the
parallelogram formed by the point
and vectors
and
. If the solution additionally satisfies
, then the intersection point lies in the triangle formed by the three points
,
and
.
The determinant of the matrix can be calculated as
:
If the determinant is zero, then there is no unique solution; the line is either in the plane or parallel to it.
If a unique solution exists (determinant is not 0), then it can be found by
inverting the matrix and rearranging:
:
which expands to
:
and then to
:
thus giving the solutions:
:
:
:
The point of intersection is then equal to
:
Uses
In the
ray tracing method of
computer graphics
Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
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.
See also
*
Plücker coordinates#Plane-line meet calculating the intersection when the line is expressed by Plücker coordinates.
*
Plane–plane intersection
References
Intersection of a Line and a Plane
{{DEFAULTSORT:Line-Plane Intersection
Euclidean geometry
Computational physics
Geometric algorithms
Geometric intersection
Planes (geometry)
cs:Analytická geometrie#Vzájemná poloha dvou rovin v třírozměrném prostoru