Graphics Programs Reference
In-Depth Information
Consider the following, illustrated in Figure 5-9 :
2.0 w
0.75 g
100 100 m 200 200 300 300 400 100 c (a) Untransformed shape
300 100 200 50 y h B
q
0.96 0.25 -0.25 0.96 0 0 cm (b) Rotate counterclockwise by 1/4 radian
100 100 m 200 200 300 300 400 100 c
300 100 200 50 y h B
Q
q
0.5 0 0 0.5 0 0 cm (c) Scale original shape by 0.5 about the origin
100 100 m 200 200 300 300 400 100 c
300 100 200 50 y h B
1 0 0 1 300 0 cm (d) Translate (c) by 300 units in the new space, i.e., 150 units in the original space
100 100 m 200 200 300 300 400 100 c
300 100 200 50 y h B
Q
Note the use of q and Q to isolate the effect of transforms.
Figure 5-9. Translation, scaling and rotation with the cm operator
 
Search WWH ::




Custom Search