Previous Next


                                                833
SECTION 9.5                                                                 3D Artwork



As described in Section 4.2, positions are defined in terms of pairs of x and y co-
ordinates on the Cartesian plane. The origin of the plane specifies the location (0,
0); x values increase to the right and y values increase upward. For three-dimen-
sional graphics, a third axis, the z axis, is required. The origin is therefore at (0, 0,
0); positive z values increase going into the page.

In two-dimensional graphics, the transformation matrix transforms the position,
size, and orientation of objects in a plane. It is a 3-by-3 matrix, where only six of
the elements can be changed; therefore, the matrix is expressed in PDF as an ar-
ray of six numbers:

 a b 0
  c d 0 = a b c d tx ty
 tx ty 1

In 3D graphics, a 4-by-4 matrix is used to transform the position, size, and orien-
tations of objects in a three-dimensional coordinate system. Only the first three
columns of the matrix can be changed; therefore, the matrix is expressed in PDF
as an array of 12 numbers:

 a    b     c   0
 d     e    f   0 =
                    a b c d e f g h i tx ty tz
  g   h     i   0
 tx   ty   tz   1

3D coordinate transformations are expressed as matrix transformations:

                        a         b     c   0
                        d          e    f   0
 x' y' z' 1 = x y z 1 ×
                         g        h     i   0
                        tx        ty   tz   1

Carrying out the multiplication has the following results:
x' = a × x + d × y + g × z + tx
y' = b × x + e × y + h × z + ty
z' = c × x + f × y + i × z + tz

Position and orientation of 3D artwork typically involves translation (movement)
and rotation along any axis. The virtual camera represents the view of the art-

Previous Next