2D Scaling
Scaling means to change the size of object. This change can either be positive or negative.
To change the size of an object, scaling transformation is used. In the scaling process, you either expand or compress the dimensions of the object.
Scaling can be achieved by multiplying the original co-ordinates of the object with the scaling factor to get the desired result.
Let us assume that the original co-ordinates are (X, Y), the scaling factors are (SX, SY), and the produced co-ordinates are (X', Y'). This can be mathematically represented as shown below:
o X' = X SX and Y' = Y SY
The scaling factor SX, SY scales the object in X and Y direction respectively. The above equations can also be represented in matrix form as below:
Where, S is the scaling matrix.
The scaling process is shown in the Fig
It specifies three co-ordinates with their own scaling factors. If scale factors,
Sx = Sy = Sz = S > 1 then the scaling is called as magnification.
Sx = Sy = Sz = S < 1 then the scaling is called as reduction.
Therefore, point after scaling with respect to origin can be calculated as,
P=P . S