i
i
i
i
i
i
i
i
6
Transformation Matrices
The machinery of linear algebra can be used to express many of the operations
required to arrange objects in a 3D scene, view them with cameras, and get them
onto the screen. Geometric transformations like rotation, translation, scaling, and
projection can be accomplished with matrix multiplication, and the transforma-
tion matrices used to do this are the subject of this chapter.
We will show how a set of points transforms if the points are represented as
offset vectors from the origin, and we will use the clock shown in Figure 6.1 as
an example of a point set. So think of the clock as a bunch of points that are the
ends of vectors whose tails are at the origin. We also discuss how these transforms
operate differently on locations (points), displacement vectors, and surface normal
vectors.
6.1 2D Linear Transformations
We can use a 2 × 2 matrix to change, or transform, a 2D vector:
a
11
a
12
a
21
a
22
x
y
=
a
11
x + a
12
y
a
21
x + a
22
y
.
This kind of operation, which takes in a 2-vector and produces another 2-vector
by a simple matrix multiplication, is a linear transformation.
By this simple formula we can achieve a variety of useful transformations,
depending on what we put in the entries of the matrix, as will be discussed in
111