Graphics Reference
In-Depth Information
In 2D, a linear transformation is completely specified by its values on two indepen-
dent vectors. An affine transformation (i.e., linear plus translation) is completely
specified by its values on any three noncollinear points, or on any point and pair of
independent vectors. A projective transformation on the plane (which we'll dis-
cuss briefly in Section 10.13) is specified by its values on four points, no three
collinear, or on other possible sets of points and vectors. These facts, and the cor-
responding ones for transformations on 3-space, are so important that we enshrine
them in a principle:
T
HE TRANSFORMATION UNIQUENESS PRINCIPLE
:
For each class of
transformations—linear, affine, and projective—and any corresponding coor-
dinate frame, and any set of corresponding target elements, there's a unique
transformation mapping the frame elements to the correponding elements in
the target frame. If the target elements themselves constitute a frame, then the
transformation is invertible.
To make sense of this, we need to define a
coordinate frame.
As a first exam-
ple, a coordinate frame for linear transformations is just a “basis”: In two dimen-
sions, that means “two linearly independent vectors in the plane.” The elements
of the frame are the two vectors. So the principle says that if
u
and
v
are linearly
independent vectors in the plane, and
u
and
v
are any two vectors, then there's a
unique linear transformation sending
u
to
u
and
v
to
v
. It further says that if
u
and
v
are independent, then the transformation is invertible.
More generally, a
coordinate frame
is a set of geometric elements rich enough
to uniquely characterize a transformation in some class. For linear transformations
of the plane, a coordinate frame consists of two independent vectors in the plane,
as we said; for affine transforms of the plane, it consists of three noncollinear
points in the plane,
or
of one point and two independent vectors, etc.
In cases where there are multiple kinds of coordinate frames, there's always
a way to convert between them. For 2D affine transformations, the three non-
collinear points
P
,
Q
, and
R
can be converted to
P
,
v
1
=
Q
P
;
the conversion in the other direction is obvious. (It may not be obvious that the
vectors
v
1
and
v
2
are linearly independent. See Exercise 10.4.)
There's a restricted use of “coordinate frame” for affine maps that has some
advantages. Based on the notion that the origin and the unit vectors along the posi-
tive directions for each axis form a frame, we'll say that a
rigid coordinate frame
for the plane is a triple
(
P
,
v
1
,
v
2
)
, where
P
is a point and
v
1
and
v
2
are
perpendic-
ular
unit vectors with the rotation from
v
1
toward
v
2
being counterclockwise (i.e.,
−
P
, and
v
2
=
R
−
with
0
v
1
=
v
2
). The corresponding definition for 3-space has one point
and three mutually perpendicular unit vectors forming a right-hand coordinate
system. Transforming one rigid coordinate frame
(
P
,
v
1
,
v
2
)
to another
(
Q
,
u
1
,
u
2
)
can always be effected by a sequence of transformation,
T
Q
◦
1
10
−
T
−
P
, (10.84)
where
T
P
(
A
)=
A
+
P
is translation by
P
, and similarly for
T
Q
, and
R
is the rotation
given by
R
◦
[
v
1
;
v
2
]
T
,
R
=[
u
1
;
u
2
]
·
(10.85)