4x4 Matrix Transformation of the Implicit Form of the Plane

Kenneth E. Hoff III
7/13/98


Given a plane as a 4-vector [ A B C D ] whose components are the coefficients of the implicit form of the plane Ax+By+Cz+D where (A,B,C) is the normal to the plane (possibly not normalized) and D is the negative distance from the origin to the plane along the normal (in units of the normal's length if not normalized), and a 4x4 transformation matrix M, we wish to transform the plane.

The simplest method would be to convert the implicit form of the plane to the point-normal form. We already have the normal as (A,B,C) and we can obtain a point on the plane as follows:

This is simple since -D is the negative distance from the origin to the plane along the normal (in units of the normal, if not normalized).

So now we have the point-normal form as 1 point on the plane and 1 vector that is the plane's normal. We can perform two transformations as follows:

Through substitution and expansion we get:

We can get the implicit form [ A' B' C' D' ] for the xformed plane as follows:

  1. Normalize the normal N' (if desired)
  2. [ A' B' C' ] = [ N'x N'y N'z ]
  3. D' = -(P' dot N')

We should be able to remove the conversion step by expanding the terms:

This gives an efficient and compact form for the planar xform without renormalization of the normal. We could then normalize as follows:

We could incorporate the normalization into the calculation more efficiently by reordering the operations of D' to compute (A'2+B'2+C'2):

So now we can compute an intermediate value L2 (length squared) before computing D' and normalization:

Note that this assumes that the 4x4 matrix does not include a projection, a shear, or a nonuniform scaling. What does it mean to project an infinite plane?