What is 2D Scaling in computer graphics? Explain the difference between…
What is 2D Scaling in computer graphics? Explain the difference between uniform and non-uniform scaling using mathematical representations in homogeneous coordinates. Additionally, calculate the new coordinates of a rectangle with vertices A(1, 1), B(4, 1), C(4, 3), and D(1, 3) when it is scaled by factors sx = 2 and sy = 3 with respect to the origin.
Attempted by 33 students.
Show answer & explanation
Definition of Scaling
2D Scaling is a geometric transformation used to change the size of an object. It involves multiplying the coordinate values (x, y) of each vertex by scaling factors sx (for the x-axis) and sy (for the y-axis). Scaling can either enlarge or compress an object depending on whether the factors are greater than or less than 1.
Uniform vs. Non-Uniform Scaling
Uniform Scaling: Occurs when sx = sy. The object changes size but maintains its original proportions (aspect ratio).
Non-Uniform Scaling: Occurs when sx != sy. The object's proportions are altered, potentially stretching or squashing it in one direction more than the other.
Mathematical Representation
In homogeneous coordinates, the scaling operation is represented by a 3 * 3$ matrix S:

Numerical Calculation
Given the rectangle vertices and scaling factors sx = 2, sy = 3, the new coordinates P' = S.P are:
Vertex A(1, 1):
x' = x*Sx = 1*2 = 2
y' = y*Sy = 1*3 = 3
New Point: A'(2, 3)Vertex B(4, 1):
x' = x*Sx = 4*2 = 8
y' = y*Sy = 1*3 = 3
New Point: B'(8, 3)Vertex C(4, 3):
x' = x*Sx = 4*2 = 8
y' = y*Sy = 3*3 = 9
New Point: C'(8, 9)Vertex D(1, 3):
x' = x*Sx = 1*2 = 2
y' = y*Sy = 3*3 = 9
New Point: D'(2, 9)