Graphics Reference
In-Depth Information
Inline Exercise 10.17: Multiply the matrix M of Equation 10.70 by the vector
u 1
1 T to confirm that you do get x 1
1 T . Do the same for the
v 1
y 1
opposite corner of the rectangle.
We'll now show you a second way to build this transformation (and many
others as well).
10.8 Building 3D Transformations
Recall that in 2D we could send the vectors e 1 and e 2 to the vectors v 1 and v 2
by building a matrix M whose columns were v 1 and v 2 , and then use two such
matrices (inverting one along the way) to send any two independent vectors v 1
and v 2 to any two vectors w 1 and w 2 . We can do the same thing in 3-space: We
can send the standard basis vectors e 1 , e 2 , and e 3 to any three other vectors, just
by using those vectors as the columns of a matrix. Let's start by sending e 1 , e 2 ,
and e 3 to three corners of our first rectangle—the two we've already specified and
the lower-right one, at location ( u 2 , v 1 ) . The three vectors corresponding to these
points are
u 1
v 1
1
u 2
v 2
1
u 2
v 1
1
,
, and
.
(10.71)
Because the three corners of the rectangle are not collinear, the three vectors are
independent. Indeed, this is our definition of independence for vectors in n -space:
Vectors v 1 ,
1)-dimensional subspace con-
taining them. In 3-space, for instance, three vectors are independent if there's no
plane through the origin containing all of them.
So the matrix
...
, v k are independent if there's no ( k
u 1 u 2 u 2
v 1 v 2 v 1
111
,
M 1 =
(10.72)
which performs the desired transformation, will be invertible.
We can similarly build the matrix M 2 , with the corresponding x s and y s in it.
Finally, we can compute
M 2 M 1 , (10.73)
which will perform the desired transformation. For instance, the lower-left cor-
ner of the starting rectangle will be sent, by M 1 ,to e 1 (because M 1 sent e 1 to
the lower-left corner); multiplying e 1 by M 2 will send it to the lower-left corner
of the target rectangle. A similar argument applies to all three corners. Indeed,
if we compute the inverse algebraically and multiply out everything, we'll once
again arrive at the matrix given in Equation 10.7. But we don't need to do so: We
know that this must be the right matrix. Assuming we're willing to use a matrix-
inversion routine, there's no need to think through anything more than “I want
these three points to be sent to these three other points.”
Summary: Given any three noncollinear points P 1 , P 2 , P 3 in E 2 , we can find
a matrix transformation and send them to any three points Q 1 , Q 2 , Q 3 with the
procedure above.
 
 
 
Search WWH ::




Custom Search