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 (2D Rotation).

We can rotate an object in two ways-

Clockwise: An object rotates clockwise if the value of the Rotation angle is negative (-).

Anti-Clockwise: An object rotates anti-clockwise if the value of the Rotation angle is positive (+).

We can apply Rotation on following objects-

  • Straight Lines
  • Curved Lines
  • Polygon
  • Circle

For Example-

Rotation of a Point: If we want to Rotate a point A (P0, Q0) that has a Rotation angle 2d Rotation with distance r from origin to A` (P1, Q1) that has a Rotation angle 2d Rotation. Then, we can rotate by following Rotation equation-

2D Rotation 2D Rotation

We can represent the coordinates of point A (P0, Q0) by using standard trigonometry-

2D Rotation

We can also define point A` (P1, Q1) in the same way-

2D Rotation

By using equation (1) (2) (3) (4), we will get-

2D Rotation

We can also represent the Rotation in the form of matrix-

2D Rotation

Homogeneous Coordinates Representation: The Rotation can also be represented in the form of 3 x 3 Rotation matrix-

2D Rotation

Example- A line segment with the starting point (0, 0) and ending points (5, 5). Apply 30-degree rotation anticlockwise direction on the line. Find the new coordinates of the line?

Solution- We can rotate the straight line by its endpoints with the same angle.

2D Rotation

We have,

(P0, Q0) = (0, 0)

Rotation Angle () = 30°

Let the new coordinates of line = (P1, Q1)

We can apply the rotation matrix, then,

2D Rotation

Thus, the new endpoint coordinates of the line are = (P1, Q1) = (1.83, 6.83)


Related Topics

Line Clipping in Computer Graphics

The line clipping is a process in which we can cut the part of the line, which lies outside the view pane. Only those lines are visible, which lie inside the view pane....

13 minutes read.

Scan Conversion in Computer Graphics

“When we represent regular objects in the form of discrete pixels, it is called Scan Conversion.” Every graphics system must transform the primitives into a collection of pixels. The scan conversion is also...

2 minutes read.

2D Reflection

The Reflection is a mirror image of the original object. In the Reflection process, the size of the object does not change. We can represent Reflection by using four ways- Reflection along...

2 minutes read.

Display Devices in Computer Graphics

The display device is an output device used to represent the information in the form of images (visual form). Display systems are mostly called a video monitor or Video display unit (VDU). Display devices are designed to model, display, view, or display information. The...

6 minutes 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.

2D Translation

We can move any object from one to another place without changing the shape of the object. For Example- Translation of a Point:If we want to translate a point from P (x0,...

1 minute 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.

Aspect Ratio in Computer Graphics

Aspect Ratio in Computer Graphics You might well understand the concept of Aspect ratio as of now if you know regarding aerial photography or see the configuration portion of any computer...

5 minutes read.

2D Scaling

In scaling, we can expend or compress the size of any object. We can apply scaling on the object by multiplying the original coordinates with scaling factors. The term scaling factor...

2 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.

Scan Conversion of an Ellipse Computer Graphics

Scan Conversion of an Ellipse: An ellipse can be defined as a closed plane curve, which is a collection of points. It is the cause of the intersection of a...

8 minutes read.

Computer Graphics Window

“The process of selecting and viewing an image with different views, called windowing.” All the objects in the real world have a size. We can measure the size and location of...

4 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.

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.

Transformation

Introduction The term Transformation is generally referred to as converting a graphic into another graphic by applying some rules or algorithms. Sometimes an image or picture can be a combination of lines, rectangle,...

2 minutes read.

Panning

“Panning is a process or photographic technique that is used to combine slow shutter speed with camera movement to make a speed sense around the moving object.” We can define panning as...

2 minutes read.

Homogenous Coordinates in Computer Graphics

Homogenous Coordinates in Computer Graphics The orbit of a point, a line graph or the whole picture on the computer, a point besides the origin, is accomplished by first shifting the...

7 minutes read.

Midpoint Circle Drawing Algorithm in Computer Graphics

The midpoint circle drawing algorithm helps us to calculate the complete perimeter points of a circle for the first octant. We can quickly find and calculate the points of other...

12 minutes read.

Anti-aliasing in Computer Graphics

Anti-aliasing in Computer Graphics “Anti-aliasing is a method for eliminating the aliasing effect used in computer graphics. In a 2-dimensional object, the ambient occlusion impact is the existence of sharp edges...

7 minutes read.

3D Shearing

We can denote shearing with ‘SHx,’ ‘SHy,’ and ‘SHz.’ These ‘SHx,’ ‘SHy,’ ‘SHz’ are called “Shearing factor.” The basic difference between 2D and 3D Shearing is that the 3D plane also...

1 minute read.