Page 80 - DCAP504_Computer Graphics
P. 80
Unit 6: 2-D Transformation
Figure 6.7 is a graphical representation of the triangle object before and after rotation.
Figure 6.7: Triangle Rotated by an Angle 90 Degree
(2, -1)
6.1.5 Shear Transformation
The shear transformation makes an object slant either in X or Y direction and is called as X-shear and Y-
shear respectively. In X-shear, the y-coordinate values of the object remain constant, but the x-
coordinate values are changed. This makes the vertical lines (lines that are parallel to Y-axis or lines that
are perpendicular to X-axis) to tilt left or right. Similarly, in Y-shear, the x-coordinate values of the
object remain constant, but the y-coordinate values are changed. This makes the horizontal lines (lines
that are parallel to X-axis or lines that are perpendicular to Y-axis) to transform up or down.
The X-shear transformation matrix is given by,
1 a
Sh x=Error! Bookmark not defined. , where, ‘a’ is the X-shear factor.
0 1
The Y-shear transformation matrix is given by,
1 0
Sh y=Error! Bookmark not defined. , where, ‘b’ is the Y-shear factor.
b 1
The object transforms right during X shear and transforms up during Y shear, when the
value of ‘a’ and ‘b’ are positive. If the values are negative, the object tilts left during X-
shear and transforms down during Y-shear.
LOVELY PROFESSIONAL UNIVERSITY 73