Graphics Reference
In-Depth Information
R t
R(45 o )
S(2,0.5)
R r
R r
T(-3,5)
R i
R s
R s
45 o
Figure 9.3.
Applying M n 1 on the vertices of a rectangle.
example, if we define a new transform operator M n , where we want to rotate a
point, then scale, and finally translate:
M n =
RST
,
then the inverse M 1
n
would be
M 1
n
T 1 S 1 R 1
=
Figure 9.3 shows an example of applying M n 1 , with
Scaling of a rectangle. In the
center diagram of Figure 9.3,
R r is a rectangle where the
edges are not parallel to the
x -or y -axis. In this case, we
see that when applying differ-
ent scaling factors in the x -
and y - directions, the right-
angle property of R r is not pre-
served.
45 )
M n 1 =
R
(
S
(
2
,
0
.
5
)
T
(
3
,
5
) ,
to the vertices of a rectangle. Notice the following in Figure 9.3.
45 )
Left diagram. The rotation of R
is applied to the input vertices of
rectangle R i . The results of this operation are the vertices of rectangle R r .
(
Center diagram. Thescaleof S
(
2
,
0
.
5
)
resizes the vertices of R r to those
of R s .
Right diagram. The translate of T
(
3
,
5
)
moves the vertices of rectangle
R s to that of R t .
Uniqueness of transform.
Transformation operators are
not unique. In general, there
are an infinite number of ways
to define operators for any
transformation operation. For
example, the operator R (
Now, to undo the transform effect of M n 1 , we must transform the vertices of
rectangle R t back to that of R i . From the three diagrams of Figure 9.3, we can
see that one straightforward way to undo the effect would be to apply the inverse
operators of Figure 9.3, from the right diagram to the left diagram:
M 1
45 )
,
T 1
S 1
R 1
45 ) ,
n 1 =
(
3
,
5
)
(
2
,
0
.
5
)
(
or any R ( θ ) where
θ =( 360 × n )+ 45
or
45 ) .
Figure 9.4 shows the details of the inverse operation. In this case, the input ver-
tices are those correspond to R t on the left diagram. The left, center, and right di-
agram of Figure 9.4 illustrate the effects of the T
M 1
n 1
=
T
(
3
,−
5
)
S
(
0
.
5
,
2
)
R
(
for any integer n , will trans-
form vertices from R i to R r .
45 )
(
3
,−
5
)
, S
(
2
,
0
.
5
)
,and R
(
of the M 1
n 1
operator.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search