Graphics Reference
In-Depth Information
V a
b
Rectangle: R i
c
T(-1,-5)
d
Rectangle: R t
S(3,0.5)
V at
V bt
V ats
V bts
V dt
V cts
V dts
Edge: e bct
Edge: e cdt
V ct
Rectangle: R ts
Figure 9.5.
Combining translate and scale operators on a rectangle.
values. Now, if a vertex has 0 for its x -coordinate value (e.g., V bt and V ct ),
then the scaling in the x -direction will not affect these vertices. Notice that
this has the effect of keeping the left side of the rectangle stationary while
stretching the right side of the rectangle by s x . As a result, the scaling oper-
ation will change the size of the rectangle by a factor of s x . Because the left
side of the rectangle does not move under the scaling operation, we have
eliminated the horizontal component of the moving side effect.
Edge e cdt . This edge resides on the x -axis. Similar to the reason given
above for e bct , since the vertices (i.e., V bt and V ct ) that define this edge have
0for y -coordinate values, these vertices are not affected by s y . As a result,
when applying the scaling factor s y , we press down the edge e cdt and com-
press the other vertices along the y -axis direction. This has the effect of
keeping the bottom edge of the rectangle stationary when stretching/com-
pressing the top edge of the rectangle by a factor of s y . Once again, because
the bottom edge of the rectangle does not move, we have eliminated the ver-
tical component of the moving side effect.
Vertex V ct . This vertex is at the origin and is not affected by any scaling
operation.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Search WWH ::




Custom Search