Page 76 - DCAP504_Computer Graphics
P. 76
Unit 6: 2-D Transformation
The figure 6.4 depicts the uniform scaling of a rectangular object.
Figure 6.4: Uniform Scaling of a Rectangle Object
Consider an example where the object is scaled unevenly, i.e., the object is
scaled by different scaling factors in X and Y directions. Let the scaling factor be
in the X direction, S x = 1.5 and Y direction, S y = 0.5. The scaling matrix can be
represented in the matrix form as,
51. 0
0 0. 5
The figure 6.4 shows a rectangle object that is scaled by a factor 1.5 in the X
direction and 0.5 in the Y direction of the 2-D space. The four points of the
rectangle object (0, 0), (2, 0), (0, 2) and (2, 2) are multiplied individually with the
scaling matrix to scale the rectangle. The point coordinate values of the
rectangle after multiplying with the scaling matrix are (0, 0), (3, 0), (0, 1) and (3,
1) as shown in figure 6.5.
Figure 6.5: Uneven Scaling of a Rectangle Object
LOVELY PROFESSIONAL UNIVERSITY 69