Graphics Reference
In-Depth Information
number (the angle of rotation) completely determines the rotation.
1
By contrast,
we'll see in Section 11.2 that in 3-space, the set of rotations is
three
-dimensional.
Furthermore, there's no nice one-to-one correspondence with a familiar object like
a circle.
Although you should, in general, use code like that described in the next chap-
ter to perform transformations, during debugging you'll often find yourself look-
ing at matrices. It's a good skill to be able to recognize translations and scales
instantly, and to be able to guess quickly that the upper-left 3
×
3 block of a matrix
is a rotation: If all entries are between
1 and 1, and the sum of the squares of
the entries in a column looks like it's approximately one, it's probably a rotation.
Finally, if the bottom row is not [0 0 0 1], you generally know that your transfor-
mation is projective rather than affine.
−
While projective transformations on 3-space are analogous to those in two dimen-
sions, it's worth explicitly writing down a few of their properties.
A projective transformation is completely specified by its action on a
projec-
tive frame,
which consists of five points in space, no four of them coplanar. (The
proof is exactly analogous to the two-dimensional proof.)
Every projective transformation on 3-space is determined by a linear trans-
formation of the
w
=
1 subspace of 4-space, represented by a 4
×
4matrix
M
,
followedbythe
homogenizing transformation
H
(
x
,
y
,
z
,
w
)=(
x
y
w
,
z
w
,1
)
.
w
,
(11.6)
If the last row of the matrix
M
is
0001
, then the transformation takes the
w
=
1 plane to itself, so
H
has no effect, and the projective transformation is in
fact an affine transformation whose matrix is
M
.
Inline Exercise 11.1:
Suppose the last row of
M
is
000
k
for some
k
=
0, 1. Show that in this case, the projective transformation defined by
M
is
still
affine. What is the matrix for this affine transformation? Hint: It's not
M
!
The matrix
M
representing a projective transformation is not unique (as you
can conclude from Inline Exercise 11.1). If
M
represents some transformation,
so does
c
M
for any nonzero constant
c
, because if
k
=
Mv
, then
(
c
M
)
v
=
c
k
;
homogenizing
c
k
involves divisions like
ck
x
ck
w
=
k
x
k
w
, which produce the same results
as homogenizing
k
itself.
The last row of the matrix
M
for a projective transformation determines the
equation of the plane on which the transformation is undefined (i.e., the “plane
sent to infinity”). If the last row is
ABCD
, then a point
xyz
1
T
1. Formally, we should say that
SO
2 rotation matrices, is a one-
dimensional
manifold,
which is, informally, a smooth shape with the property that at
every point, there is essentially only one direction in which to move; in the case of
the circle, this “direction” is that of increasing or decreasing angle. By contrast, the
surface of the Earth is a 2-manifold, because at each point there are two independent
directions for motion—at any point except the poles, one can take these to be north-
south and east-west; any other direction is a combination of these two.
(
2
)
,thesetof2
×