Game Development Reference
In-Depth Information
9.5.1
The Plane Equation: An Implicit Definition of a Plane
We can represent planes using techniques similar to the ones we used to
describe infinite 2D lines in
Section 9.2.2.
The implicit form of a plane is
given by all points
p
= (x,y,z) that satisfy the plane equation:
ax + by + cz = d
(scalar notation),
The plane equation
p
n
= d
(vector notation).
(9.10)
Note that in the vector form,
n
= [a,b,c]. Once we know
n
, we can compute
d from any point known to be in the plane.
Most sources give the plane equation as ax + by + cz + d = 0. This has the
effect of flipping the sign of d. Our comments in Section 9.2.2 explaining
our preference to put d on the left side of the equals sign also apply here:
our experience is that this form results in fewer terms and minus signs and
a more intuitive geometric interpretation for d.
The vector
n
is called the plane normal because it is perpendicular
(normal) to the plane. Although
n
is often normalized to unit length, this
is not strictly necessary. We use a hat (
n
) when we are assuming unit
length. The normal determines the orientation of the plane; d defines its
position. More specifically, it determines the signed distance to the plane
from the origin, measured in the direction of the normal. Increasing d slides
the plane forward, in the direction of the normal. If d > 0, the origin is
on the back side of the plane, and if d < 0, the origin is on the front side.
(This assumes we put d on the right-hand side of the equals sign, as in
Equation (9.10). The standard homogenous form with d on the left has the
opposite sign conventions.)
Let's verify that
n
is perpendicular to the plane. Assume
p
and
q
are arbitrary points in the plane, and therefore satisfy the plane equation.
Substituting
p
and
q
into Equation (9.10), we get
n
p
= d,
n
q
= d,
n
p
=
n
q
,
n
p
−
n
q
= 0,
n
(
p
−
q
) = 0.
(9.11)
Search WWH ::
Custom Search