2000-06
A point is defined in 3D via three components; these
usually represent the distances along each axis. Often, the handedness or
labels are different; standard handedness is often abandoned to have |
A 3D engine converts points in a 3D world to points on the screen. The point
(x, y, z) in World Space is transformed into (x', y', z') in View Space
(Camera Space, Eye Space, et cetera.) It is then projected to the 2D
screen, usually by perspective projection in 3D engines. The transformation
to View Space can be seen as a matrix.
Below, the big thing is the matrix; it's the coördinates of the camera. It's not an esoteric, abstract thing; it can be seen as a collection of simple dot products grouped together for convenience. It's all very neat and good. The computer just adds and multiplies, a matrix is a human construction to organise the information. We are free to let any isomorphism represent the transformation. Let's deconstruct the matrix as a (relatively) simple set of three plane equations.

Instead of a distance along the |
Instead of a distance along the |
Instead of a distance along the |
Actually, this is easy; you just separate the rows, eg
(x') = (xA xB xC xD) ·
(y y z 1) becomes, x' = xA x + xB y +
xC z + xD. If x' = 0, this is the plane
equation for the camera's x; it's locus of all points whose distance is
equal to zero. The coefficients expressed as a vector, (xA, xB, xC),
will be the normal to the plane.
Plane with x-axis normal: x' = xA x + xB y + xC z + xD,
plane with y-axis normal: y' = yA x + yB y + yC z + yD,
plane with z-axis normal: z' = zA x + zB y + zC z + zD.
Having calculated three planes, it becomes a simple matter of plugging in
the coördinates of a point to determine its distance to the plane.
Substituting a point at (x, y, z) into the above equations will give
three answers, one for each plane. These form a vector, (x', y', z'),
that is the coordinates of the point with respect to the axes defined by
these planes. This is an isomorphism to the matrix transform.
This might be useful to calculate z values and skip calculating the x
and y if z doesn't fall between clipping distances, or maybe just never
finding z in a parallel projection. Graphics accelerators do
this for you.