Scaling, like translation is is a simple transformation which just scales the coordinates of an object. It is specified either by working directly with the local coordinates, or by expressing the coordinates in terms of Frames

For a pdf version of these notes look here.

** Development of the Transformation via Scaled Frames**

Given a frame , a scaled frame would be one that is given by - that is, we just expand (or contract) the lengths of the vectors defining the frame. It is fairly easy to see that we can write the frame in terms of the frame by

So a matrix implements a scaling transformation on frames, and any matrix of this type (for arbitrary ) will scale the frame . We call the matrix

a scaling matrix and utilize matrices of this type to implement our scaling operations.

** Applying the Transformation Directly to the Local Coordinates**

Given a frame and a point that has local coordinates in , if we apply the transformation to the local coordinates of the point, we obtain

and we have scaled the point

** Scaling about Points other than the Origin**

It is difficult to see the origin of the scaling operation when working only with coordinates - so for example, consider the eight vertices of a cube centered at the origin in the Cartesian frame.

(-1, -1, 1 )

(-1, 1, 1 )

(1, 1, 1 )

(1, -1, 1 )

(-1, -1, -1 )

(-1, 1, -1 )

(1, 1, -1 )

(1, -1, -1 )

If we consider the ``scaling'' transformation given by
(-1, 1, 1 )

(1, 1, 1 )

(1, -1, 1 )

(-1, -1, -1 )

(-1, 1, -1 )

(1, 1, -1 )

(1, -1, -1 )

and apply this matrix to each of the coordinates of the points relative to the standard frame, we obtain a new set of points

(-2, -2, 2 )

(-2, 2, 2 )

(2, 2, 2 )

(2, -2, 2 )

(-2, -2, -2 )

(-2, 2, -2 )

(2, 2, -2 )

(2, -2, -2 )

which is an effective scaling of the cube (The resulting cube has
volume 8 times the original). This
operation is illustrated in the following figure (Note that this
figure is viewing the cube from along the
axis).
(-2, 2, 2 )

(2, 2, 2 )

(2, -2, 2 )

(-2, -2, -2 )

(-2, 2, -2 )

(2, 2, -2 )

(2, -2, -2 )

We note that this operation scales about the origin of the coordinate system. If the center of the object is not at the origin, this operation will move the object away from the origin of the frame. If we consider a cube with the following coordinates at its corners

(1, 1, 1 )

(1, 3, 1 )

(3, 3, 1 )

(3, 1, 1 )

(1, 1, 3 )

(1, 3, 3 )

(3, 3, 3 )

(3, 1, 3 )

Then by applying the above transformation, this cube is transformed to
a cube with the following coordinates
(1, 3, 1 )

(3, 3, 1 )

(3, 1, 1 )

(1, 1, 3 )

(1, 3, 3 )

(3, 3, 3 )

(3, 1, 3 )

(2, 2, 2 )

(2, 6, 2 )

(6, 6, 2 )

(6, 2, 2 )

(2, 2, 6 )

(2, 6, 6 )

(6, 6, 6 )

(6, 2, 6 )

which is a cube with volume 8 times the original, but
centered at the point .
This is illustrated in the following figure.
(2, 6, 2 )

(6, 6, 2 )

(6, 2, 2 )

(2, 2, 6 )

(2, 6, 6 )

(6, 6, 6 )

(6, 2, 6 )

If the desired scaling point is not at the origin of the frame, we must utilize a combination of transformations to get an object to scale correctly. If the scaling point is at in the frame, we can utilize the translation to first move the point to the origin of the frame, then scale the object, and finally use the translation to move the point back to the origin of the scaling. These transformations are all represented by matrices:

and we take their matrix product to create one matrix that gives the transformation.

** Summary**

The scaling transformation can be represented by a simple matrix whose only entries are on the diagonal. This transformation, when applied to an object multiplies each of the local coordinates of the object by a factor - effectively scaling the object about the origin. Scaling about other points can be done by combining the scaling transformation with two translation transformations.

**Return to
the Graphics Notes Home Page**

**Return
to the Geometric Modeling Notes Home Page**

**Return
to the UC Davis Visualization and Graphics Group Home Page**

**This document maintained by Ken
Joy**

All contents copyright (c) 1996, 1997, 1998,
1999

Computer Science Department

University of California, Davis

All rights reserved.

1999-12-06