2D Rotation Transformation
In computer graphics, transformation is the process of changing the position, size, or orientation of an object. Among these transformations, rotation is one of the most important geometric operations. 2D rotation transformation refers to rotating a point or object in a two-dimensional plane about a fixed point by a given angle.
Rotation does not change the shape or size of the object; it only changes its orientation. This property makes rotation a rigid body transformation. It is widely used in animation, gaming, robotics, and image processing where objects need to be rotated smoothly without distortion.
Concept of Rotation
Rotation can be understood as the movement of a point along a circular path around a fixed center. During rotation, the distance between the point and the center of rotation remains constant, but its angle with respect to the axes changes.
For example, if a point is rotated by 90 degrees counterclockwise, it will move to a new position while maintaining the same distance from the origin.
Rotation About Origin
When a point is rotated about the origin (0,0), trigonometric relationships are used to compute the new coordinates.
If a point is represented as (x, y), then after rotating it by an angle θ in counterclockwise direction, the new coordinates become:
- x' = x cosθ − y sinθ
- y' = x sinθ + y cosθ
These formulas are derived using trigonometric expansion of polar coordinates.
Numerical Example 1
Let us rotate the point P(2,1) by 90° counterclockwise about the origin.
We know:
cos 90° = 0 and sin 90° = 1
Now applying formulas:
x' = (2 × 0) − (1 × 1) = -1
y' = (2 × 1) + (1 × 0) = 2
So the new position of the point becomes (-1, 2). This shows that the point has rotated 90 degrees around the origin while maintaining its distance.
Clockwise Rotation
If the rotation is clockwise, the direction is considered negative, and the formulas slightly change. In clockwise rotation, the new coordinates are:
- x' = x cosθ + y sinθ
- y' = −x sinθ + y cosθ
This is useful in screen coordinate systems where the y-axis direction is inverted.
Numerical Example 2
Rotate P(2,3) by 90° clockwise about the origin.
We use:
cos 90° = 0, sin 90° = 1
Now applying formulas:
x' = (2 × 0) + (3 × 1) = 3
y' = −(2 × 1) + (3 × 0) = -2
So the new point is (3, -2). This confirms clockwise rotation behavior.
Rotation About Arbitrary Point
In many practical applications, objects do not rotate around the origin. Instead, they rotate around a fixed point (h, k). In such cases, we cannot directly apply rotation formulas. Instead, we follow a three-step process.
First, we translate the object so that the pivot point (h, k) moves to the origin. Then we apply rotation formulas as usual. Finally, we translate the object back to its original position.
This method ensures correct rotation around any arbitrary point.
Numerical Example 3
Rotate point P(4,3) by 90° counterclockwise about the point (2,2).
First, we translate the point:
x1 = 4 − 2 = 2
y1 = 3 − 2 = 1
Now we apply rotation:
x2 = (2 × 0) − (1 × 1) = -1
y2 = (2 × 1) + (1 × 0) = 2
Finally, we translate back:
x' = -1 + 2 = 1
y' = 2 + 2 = 4
So the final rotated point is (1,4). This shows how translation and rotation work together for arbitrary pivot rotation.
Matrix Representation of Rotation
Rotation can also be represented in matrix form, which is widely used in computer graphics systems for efficient computation.
The rotation matrix is:
[ cosθ -sinθ ]
[ sinθ cosθ ]
When multiplied with a coordinate vector (x, y), it produces the rotated point (x’, y’). This matrix form is powerful because it allows transformations to be combined easily.
Properties of Rotation
Rotation has several important properties. It preserves distances between points, meaning the size of the object remains unchanged. It also preserves angles, so the shape of the object is not distorted. Rotation is therefore classified as a rigid transformation.
Another important property is that rotation is reversible. If an object is rotated by θ degrees, it can be brought back to its original position by rotating it by -θ degrees.
Geometrical Interpretation
Geometrically, rotation means that a point moves along a circular path centered at the pivot point. The radius remains constant, and only the angular position changes. This is why rotation is closely related to circular motion in geometry.
Applications of Rotation
Rotation is widely used in real-world computer graphics applications. In animation, it is used to rotate characters, objects, and camera views. In gaming, it helps in controlling movement and direction. In robotics, rotation is used to control the movement of robotic arms. It is also used in CAD software for designing mechanical components and in image processing for rotating images.
NUMERICAL PROBLEMS
Basic Level Problems
- Rotate the point P(2, 3) by 90° counterclockwise about the origin. Find the new coordinates.
- Rotate the point P(4, 1) by 90° clockwise about the origin.
- Rotate the point P(3, 5) by 180° counterclockwise about the origin.
- Rotate the point P(6, 2) by 270° counterclockwise about the origin.
- Find the image of point P(1, -2) after 90° counterclockwise rotation about the origin.
Intermediate Level Problems
- Rotate the point P(5, 4) by 90° counterclockwise about the origin and verify distance preservation.
- Rotate point P(3, 3) by 180° clockwise about the origin.
- Find the new position of P(2, 7) after 270° clockwise rotation about origin.
- Rotate point P(4, -3) by 90° counterclockwise and show result geometrically.
- Rotate point P(-2, 5) by 180° about origin.
Arbitrary Point Rotation Problems
- Rotate point P(4, 3) by 90° counterclockwise about point (2, 2).
- Rotate point P(6, 5) by 90° clockwise about point (3, 3).
- Rotate point P(3, 7) by 180° about point (1, 2).
- Rotate point P(5, 6) by 90° counterclockwise about point (4, 1).
- Rotate point P(8, 3) by 270° counterclockwise about point (2, 2).
Advanced Level Problems (Exam Important)
- Rotate triangle with vertices A(1,1), B(2,3), C(4,2) by 90° counterclockwise about origin.
- Rotate rectangle with vertices A(1,1), B(4,1), C(4,3), D(1,3) by 180° about origin.
- Rotate triangle A(2,2), B(5,2), C(3,6) by 90° clockwise about point (2,2).
- A point P(x, y) = (3, 4) is rotated by 90° counterclockwise. Find new coordinates and verify distance from origin remains same.
- Rotate polygon points P1(1,2), P2(3,2), P3(3,4), P4(1,4) by 270° counterclockwise about origin.
Challenge Questions
- Prove using numerical example that 90° clockwise rotation is equivalent to 270° counterclockwise rotation.
- Rotate point P(7, -3) by 90° counterclockwise about origin and then rotate result by 90° clockwise. What do you observe?
- A point is rotated twice by 90° counterclockwise. What is the final equivalent rotation angle?
- Rotate point P(-4, -2) by 180° about point (-1, -1).
- A square is rotated by 90° about its center. Explain how coordinates change.
Conclusion
2D rotation transformation is a fundamental concept in computer graphics that allows objects to rotate around a fixed point without changing their shape or size. It is based on trigonometric principles and can be implemented using matrix multiplication. Rotation can be performed about the origin or any arbitrary point using translation and rotation steps. Its properties of preserving shape, size, and angles make it essential in many real-world applications.