2d Scaling Transformation Numerical Examples


Problem Statement-1

Magnify a triangle placed at A (0,0), B (1,1) and C (5,2) to twice its size keeping the point C (5,2) Fixed.

If the point C (5,2) needs to be fixed this means the transformation scaling needs to be done with respect to the point C (5,2). So, we will bring the point C (5,2) to origin first and then perform the transformation and finally send the point C (5,2) back.

In other words, we would perform a negative translation with Tx =5 and Ty = 2 then perform scaling transformation Sx and Sy =2 and finally a positive translation with Tx=5 and Ty=2.

Computer graphics only provides the transformation with respect to origin. To get above transformation we need to perform multiple transformations, which is also knowns as composite transformation.

We would obtain the that composite transformation as follows:

So New Triangle Coordinates = Positive Translation Matrix * Scaling Matrix * Negative Translation Matrix

The Composite Scaling Transformation

With values tx=5, ty=2 and sx and sy=2.

With Values of tx, ty,sx and sy
The result after Multiplication of the first two matrices.
Multiply the resultant matrix of scaling composite transformation with Triangle Matrix
New Coordinates of Triangle

The new triangle coordinates are A'(-5,-2), B(-3,0) and C'(5,2). You can see point C(5,2) remained unchanged after scaling transformation. Which confirms that the solution is correct.


Problem Statement -2

Magnify a triangle placed at A(0,0), B(1,1) and C(5,2) to twice its size.

Magnification and Compression words relates to scaling of an object. So Scaling transformation should do the needful. Since we have to magnify the triangle to twice its size, we would take the scaling coordinates Sx and Sy as 2. Sx =2 and Sy =2.

Please remember if nothing is mentioned about the point of transformation then assume it from origin.

We will multiply the scaling matrix with the triangle matrix to get the coordinates after transformation.

So New Triangle Coordinates = Scaling Matrix * Triangle Matrix.

Scaling_Triangle
Scaling Matrix and Triangle Matrix
Scaling_Values
Substitute the values of Sx and Sy=2
Scaling_Result
Triangle Matrix after magnification.

It is clear from the resultant matrix that A’ B’ and C’ are magnified to twice its size. The new coordinates of the triangle are A’ (0,0), B’(2,2) and C’(10,4)