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

3D Translation

A 3D Translation process contains the x-axis, y-axis, and z-axis. We can move any object from one place to another without changing the shape of the object. For Example-Translation of a...

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

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.

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.

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.

Animation in Computer Graphics

The word Animation is extracted from a Latin language, "Anima," which means "Soul." TheAnimation is a technology that allows any image object, an entity to walk, talk, or do some...

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

3D Rotation

The 3D rotation is different from 2D rotation. In 3D Rotation we also have to define the angle of Rotation with the axis of Rotation. For Example- Let us assume, The initial...

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

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.

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.

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.

Pointing and Positioning Technique Computer Graphics

Pointing and Positioning Technique: The pointing and positioning are interactions used in computer graphics. A pointing device is also called a Pointing tool. A pointing tool is a hardware component,...

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

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.

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.

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.

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.

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.

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.