Graphics Reference
In-Depth Information
w
The idea is this: As our Euclidean plane (our set of points ), we'll take the plane
w = 1in xyw -space (see Figure 10.11). The use of w here is in preparation for
what we'll do in 3-space, which is to consider the three-dimensional set defined
by w = 1in xyzw -space.
Having done this, we can consider transformations that multiply such vectors
bya3
y
x
Figure 10.11: The w = 1 plane in
xyw-space.
3matrix M . The only problem is that the result of such a multiplication
may not have a 1 as its last entry. We can restrict our attention to those that do:
×
x
y
1
abc
def
pqr
x
y
1
=
.
(10.58)
For this equation to hold for every x and y ,wemusthave px + qy + r = 1 for all
x , y . This forces p = q = 0 and r = 1.
Thus, we'll consider transformations of the form
x
y
1
abc
def
001
x
y
1
=
.
(10.59)
If we examine the special case where the upper-left corner is a 2
×
2 identity
matrix, we get
10 c
01 f
001
x
y
1
x + c
y + f
1
=
.
(10.60)
As long as we pay attention only to the x - and y -coordinates, this looks like a
translation! We've added c to each x -coordinate and f to each y -coordinate (see
Figure 10.12). Transformations like this, restricted to the plane w = 1, are called
affine transformations of the plane. Affine transformations are the ones most
often used in graphics.
On the other hand, if we make c = f = 0, then the third coordinate becomes
irrelevant, and the upper-left 2
2 matrix can perform any of the operations we've
seen up until now. Thus, with the simple trick of adding a third coordinate and
requiring that it always be 1, we've managed to unify rotation, scaling, and all the
other linear transformations with the new class of transformations, translations,
to get the class of affine transformations.
×
10.5 Points and Vectors Again
Back in Chapter 7, we said that points and vectors could be combined in certain
ways: The difference of points is a vector, a vector could be added to a point
T
Figure 10.12: The house figure, before and after a translation generated by shearing par-
allel to the w = 1 plane.
 
 
 
Search WWH ::




Custom Search