Graphics Reference
In-Depth Information
1
y
22 +cos 30
sin 30
4
232
445
111
44 +sin 30
4 +cos 30
.
(10.77)
1
1
1
Both approaches are reasonably easy to work with.
There's a third approach—a variation of the second—in which we specify
where we want to send a point and two vectors, rather than three points. In this
case, we might say that we want the point P to remain fixed, and the vectors e 1
and e 2 to go to
x
y
cos 30
sin 30
0
sin 30
cos 30
0
and
,
(10.78)
respectively. In this case, instead of finding matrices that send the vectors e 1 , e 2 ,
and e 3 to the desired three points, before and after, we find matrices that send those
vectors to the desired point and two vectors, before and after. These matrices are
x
2 cos 30
sin 30
210
401
100
and
,
4 sin 30
cos 30
(10.79)
y
1
0
0
so the overall matrix is
1
2 cos 30
sin 30
210
401
100
x
4 sin 30
cos 30
.
(10.80)
1
0
0
These general techniques can be applied to create any linear-plus-translation
transformation of the w = 1 plane, but there are some specific ones that are good
to know. Rotation in the xy -plane, by an amount
Figure 10.15: The house after
translating ( 2, 4 ) to the origin,
after rotating by 30 , and after
translating
θ
(rotating the positive x -axis
toward the positive y -axis) is given by
the
origin
back
to
cos
θ −
sin
θ
0
(
2, 4
)
.
.
R xy (
θ
)=
sin
θ
cos
θ
0
(10.81)
0
0
1
In some topics and software packages, this is called rotation around z ; we prefer
the term “rotation in the xy -plane” because it also indicates the direction of rotation
(from x ,toward y ). The other two standard rotations are
1
0
0
0 cos
θ −
sin
θ
R yz (
θ
)=
(10.82)
0 sin
θ
cos
θ
and
cos
θ
θ
01 0
0 sin
;
R zx (
θ
)=
(10.83)
sin
θ
0 cos
θ
note that the last expression rotates z toward x , and not the opposite. Using this
naming convention helps keep the pattern of plusses and minuses symmetric.
 
Search WWH ::




Custom Search