Scaling points with x, y, and z
It might seem a strange proposition to scale a single point if you think about it, as a point has no size—it’s just a location in space. So, what happens if you try to scale it through the affine transformation of scaling? Well, scaling is an operation performed by the multiplication of each of the point coordinates. Take, for example, the point (2, 4, 6)—if this is scaled by 0.5 (in other words, halved), the resulting point is (1, 2, 3). In this case, what has happened to the point is that it has been moved.
The formal mathematics for scaling is:
P(x, y, z) = S x Q(x, y, z)
Here, the x, y, and z coordinates of the resulting point P are the point Q’s individual coordinates multiplied by S. Let’s consider again the cube from Figure 12.2. The result of multiplying each of the cube’s vertices by 0.5 will result in the cube shown in Figure 12.4:
Figure 12.4: A scaled cube
In this...