2D Shearing

We can denote shearing with ‘SHx’ and ‘SHy.’ These ‘SHx’ and ‘SHy’ are called “Shearing factor.”

We can perform shearing on the object in two ways-

  • Shearing along x-axis: In this, we can store the y coordinate and only change the x coordinate. It is also called “Horizontal Shearing.”

We can represent Horizontal Shearing by the following equation-

X1 = X0 + SHx. Y0

Y1 = Y0

We can represent Horizontal shearing in the form of matrix-

2D Shearing

Homogeneous Coordinate Representation: The 3 x 3 matrix for Horizontal Shearing is given below-

2D Shearing 2D Shearing
  • Shearing along y-axis: In this, we can store the x coordinate and only change the y coordinate. It is also called “Vertical Shearing.”

We can represent Vertical Shearing by the following equation-

X1 = X0

Y1 = Y0 + SHy. X0

We can represent Vertical Shearing in the form of matrix-

2D Shearing

Homogeneous Coordinate Representation: The 3x3 matrix for Vertical Shearing is given below-

2D Shearing 2D Shearing

Example: A Triangle with (2, 2), (0, 0) and (2, 0). Apply Shearing factor 2 on X-axis and 2 on Y-axis. Find out the new coordinates of the triangle?     

Solution: We have,

The coordinates of triangle = P (2, 2), Q (0, 0), R (2, 0)

Shearing Factor for X-axis = 2

Shearing Factor for Y-axis = 2

Now, apply the equation to find the new coordinates.

Shearing for X-axis:

For Coordinate P (2, 2)-

Let the new coordinate for P = (X1, Y1)

X1 = X0 + SHx. Y0 = 2 + 2 x 2 = 6

Y1 = Y0 = 2

The New Coordinates = (6, 2)

For Coordinate Q (0, 0)-

Let the new coordinate for Q = (X1, Y1)

X1 = X0 + SHx. Y0 = 0 + 2 x 0 = 0

Y1 = Y0 = 0

The New Coordinates = (0, 0)

For Coordinate R (2, 0)-

Let the new coordinate for R = (X1, Y1)

X1 = X­0 + SHx. Y0 = 2 + 2 x 0 = 2

Y1 = Y0 = 0

The New Coordinates = (2, 0)

The New coordinates of triangle for x-axis = (6, 2), (0, 0), (2, 0)

2D Shearing 2D Shearing

Shearing for y-axis: 

For Coordinate P (2, 2)-

Let the new coordinate for P = (X1, Y1)

X1 = X0 = 2

Y1 = Y0 + Shy.X0 = 2 + 2 x 2 = 6

The New Coordinates = (2, 6)

For Coordinate Q (0, 0)-

Let the new coordinate for Q = (X1, Y1)

X1 = X0 = 0

Y1 = Y0 +Shy. X0 = 0 + 2 x 0 =0

The New Coordinates = (0, 0)

For Coordinate R (2, 0)-

Let the new coordinate for R = (X1, Y1)

X1 = X0 = 2

Y1 = Y0 + Shy. X0 = 0 +2 x 2 = 4

The New Coordinates = (2, 4)

The New coordinates of triangle for y-axis = (2, 6), (0, 0), (2, 4)

2D Shearing

Related Topics

2D Shearing

We can denote shearing with ‘SHx’ and ‘SHy.’ These ‘SHx’ and ‘SHy’ are called “Shearing factor.” We can perform shearing on the object in two ways- Shearing along x-axis: In this, we...

2 minutes read.

Output Devices in Computer Graphics

Computer Graphics Output Devices An output device is a component of hardware or the main physical part of a computer that can be touched and seen. An output device is an electromechanical device. “The...

5 minutes read.

Display Processor

It is a part of hardware or interpreter which is used to transform display processor code into pictures. It is used to convert digital information from CPU to analog data. It...

4 minutes read.

Projection in Computer Graphics

Projection Introduction: The technique projection was invented by the Swiss mathematician, engineer, and astronomer "Leonhard Euler Around" in 1756. The "Episcope" was the first projection system. “Projection is a technique or process which...

4 minutes read.

Text Clipping

“Text Clipping is a process in which we remove those part (portion) of string that is outside the view pane (window).” Various methods and techniques can do the text clipping. These techniques depend...

2 minutes read.

Filled Area Primitives Computer Graphics

Filled Area Primitives: Area filling is a method or process that helps us to fill an object, area, or image. We can easily fill the polygon. The polygon filling is...

4 minutes read.

Input Devices in Computer Graphics

An Input device is the piece of computer hardware equipment used to give input to the computer. The input can be in the form of graphics, text, sound, audio, video,...

7 minutes read.

Scan Conversion of a Circle Computer Graphics

A circle is an eight-way symmetric shape. All quadrants of a circle are the same. There are two octants in each quadrant of a circle. If we know the value of any...

3 minutes read.

Types of Computer Graphics

Types of Computer Graphics The computer graphics contains two types. They are- Raster (Bitmap) graphicsVector graphics Many individuals are likely to consider pictures on computers (or phones, tablets, or some other electronic gadget...

5 minutes read.

Zooming

In computer graphics, the term “Zoom is referred as a function, focuses on a particular portion or part of an image and also enlarging the image’s size for greater details.” In windows...

2 minutes read.

Clipping in Computer Graphics

“The Clipping is a type of transformation used in computer graphics to remove lines, objects, and segments of lines that are outside the computer screen or viewing pane.” The clipping is a...

2 minutes read.

Computer Graphics Tutorial

Introduction to Computer Graphics Computer graphics is commonly seen as a computer science branch that deals with the computerized image fusion theory and technology. As simple as a triangle outline, a...

6 minutes read.

Composite Transformation in Computer Graphics

Composite transformation in Computer Graphics It is possible to integrate a range of transformations or series of transformations into some kind of a single one which is known as composition. The...

6 minutes read.

Illumination Model in Computer Graphics

Illumination Model in Computer Graphics The series of methods used to depict light in computer graphics scenarios is computer graphics illumination. Although lighting strategies provide versatility in the degree of detail...

8 minutes read.

2D Rotation

The Rotation of any object depends upon the two points. Rotation Point: It is also called the Pivot point. Rotation Angle: It is denoted by Theta (). We can rotate an object in...

1 minute read.

Line Drawing Algorithm in Computer Graphics

“The Line drawing algorithm is a graphical algorithm which is used to represent the line segment on discrete graphical media, i.e., printer and pixel-based media.” A line contains two points....

3 minutes read.

Color Models in Computer Graphics

"Color model is a 3D color coordinate system to produce all range of color through the primary color set." There are millions of colors used in computer graphics. The light...

3 minutes read.

History of Computer Graphics

History of Computer Graphics Computer Graphics (CG) was first developed as a visualization tool. Computer graphics were basically introduced for scientists and engineers in government and corporate research centers, i.e., Bell Labs and Boeing...

4 minutes read.

3d Scaling

The 2D and 3D scaling are similar, but the key difference is that the 3D plane also includes the z-axis along with the x and y-axis. In scaling, we can expend...

2 minutes read.

Point Clipping

“Point clipping is a process which is used to define the point position.” The point is either inside the view pane (window) or outside the view pane. In computer graphics, the computer...

2 minutes read.