3-Dimensional Scaling:
In 3-D, Scaling is also an extension of scaling in 2-D. Similar to the 2-D case, if Sx = Sy = Sz then object shapes are maintained, else they are deformed. Sx, Sy and Sz are the scaling factors respectively in x, y and z directions.
Scaling x′ = x * Sx
y′ = y * Sy
z′ = z * Sz
Entire scaling may be obtained by utilizing the fourth diagonal element, that means
It is obvious that in this case
(x* y* z* 1) = (x′ /s, y′/s, (z′ /s) 1).
Figure: 3-Dimensional Scaling
If object is not centred at the origin (0, 0, 0) scaling transformation causes size alter and movement of the object both. Though, scaling around a fixed point
P0 (x1 y1 z1) may be accomplished by
1. translating P0 to the origin
2. scale the object
3. translating P0 back to original position.
So the composite matrix is T = (- x1 , - y1 , - z1 ) ∗ S (S x , S y , S z ) * T ( x1 , y1 , z1 ) .
For inverse scaling replace Sx with 1/ S x , Sy with 1/ S y , and Sz with 1/S z , then S (S -1 ) = 1