Shear in Computer Graphic
A Transformation that slants the shape of an object is called the shear transformation. Two common shearing transformations are used. One shifts coordinate values and other shift y co- ordinate values. However in both the cases only one co-ordinate (xory)changes its coordinates and other preserves its values.

X- Shear
The x shear preserves the y coordinates, but changes the x values which cause vertical lines to tilt right or left as shown in figure
The Transformations matrix for x-shear is

which transforms the coordinates as
x’ =x+ shx .y ;y’ =y
Y - Shear
The y shear preserves the x coordinates, but changes the y values which cause horizontal lines which slope up or down The Transformations matrix for y-shear is

which transforms the coordinates as x’ = x
y’ = y + y shx .x
XY - Shear
The transformation matrix for xy-shear
=
which transforms the coordinates as
x’ = x +xshx.y y’ = y +yshx
Shearing Relative to other reference line
We can apply x shear and y shear transformations relative to other reference lines. In x shear transformations we can use y reference line and in y shear we can use x reference line.
X - Shear with y reference line
We can generate x-direction shears relative to other reference lines with the transformation matrix

which transforms the coordinates as
x’ = x+xshx (yref y)
y’ = y
Example
Shx = ½ and Yref = -1

Y - Shear with x reference line
We can generate y-direction shears relative to other reference lines with the transformation matrix which transforms the coordinates as

Example
x’ = x
Y’ = shy (x – x ref) + y Shy = ½ and x ref = -1
