Graphics Reference
In-Depth Information
a 000
0 b 00
00 c 0
0001
.
(11.2)
Scale transformations in which one or three of a , b , and c are negative
reverse orientation: A triple of vectors v 1 , v 2 , v 3 that form a right-handed
coordinate system will, after transformation by such a matrix, form a left-
handed coordinate system. A uniform scale by a negative number has all
three diagonal entries negative, and hence reverses orientation.
• Similarly, shearing transformations continue to leave a line fixed. Points
not on this line are moved by an amount that depends on their position
relative to the line, but this position is now measured in two dimensions
instead of just one. There are also shears that leave a plane fixed.
• Reflections in 2D were either reflections through a point (the transforma-
tion x
,
or reflections through a line . In 3D, there are reflections through a point,
a line, or a plane. Reflection through a line corresponds to rotation about
the line by
→−
x ), which turns out to be the same as rotation by an angle
π
x ;
in contrast to the two-dimensional case, this map is orientation-reversing.
Finally, reflection through a plane is given by the map
π
. Reflection through a point is still given by the map x
→−
x
x
2 ( x
·
n ) n ,
(11.3)
where n is the unit normal vector to the plane. This is algebraically analo-
gous to reflection through a line in two dimensions, but in three dimensions
it is orientation-preserving . The matrix for this map is
1
2 n x
2 n x n y
2 n x n z
0
2 n y
2 n x n y
1
2 n y n z
0
2 nn T =
I
,
(11.4)
2 n z
2 n x n z
2 n y n z
1
0
0
0
0
1
but it should come as no surprise at this point that we recommend that
you use the expression I
2 nn T to create a reflection matrix rather than
explicitly typing in the matrix entries, which is prone to error.
The most important difference between two and three dimensions arises when
we consider rotations . In two dimensions, the set of rotations about the origin
corresponds nicely with the unit circle: If R is a rotation, we look at R ( e 1 ) , which
is a point on the unit circle. This gives a mapping from rotations to the circle;
the inverse mapping is given by taking each point [ x , y ] T on the unit circle and
associating to it the rotation whose matrix is
x
,
y
yx
(11.5)
for which it's easy to verify that e 1 is sent to [ x , y ] T . Thus, we can say that the
set of rotations in two dimensions is a one-dimensional shape: Knowing a single
 
Search WWH ::




Custom Search