A scaling transformation changes the size of an object.
This operation can be carried out for polygons by multiplying the coordinate
values (x, y) of each vertex by scaling factors S

_{x}and S_{y}to produce the transformed coordinates (x', y').
x' = x • S

_{x}and y' = y • S_{y}
Scaling factor S

_{x}scales object in the x direction and scaling factor S_{y}scales object in the y direction._{x }0

_{ }

x', y' =
x y

0 S

_{y}
= x
. S

_{x }y . S_{y}
=
P . S

Any positive numeric values are valid for scaling factors
S

_{x}and S_{y}. Values less than 1 reduce the size of the objects and values greater than 1 produce an enlarged object. For both S_{x}and S_{y}values equal to 1, the size of object does not change. To get uniform scaling it is necessary to assign same value for S_{x}and S_{y}. Unequal values for S_{x}and S_{y}result in a different scaling.**Example**

Scale the polygon with coordinates A(2, 5), B(7, 10) and
C(10, 2) by two units in x direction and 2 units in y direction.

__HOMOGENOUS COORDINATES__

In design and picture formation process, many times we
may require to perform translation, rotation and scaling to fit the picture
components into their proper positions. To produce a sequence of
transformations, we must calculate the transformed coordinates one step at a
time. First, coordinates are translated, then these translated coordinates are
scaled and finally, the scaled coordinates are rotated. But this sequential
transformations process is not efficient. A more efficient approach is to
combine sequence of transformations into one transformation so that the final
coordinate positions are obtained directly from initial coordinates. This
eliminates the calculation of intermediate coordinate values. In order to
combine sequence of transformations we have to eliminate the matrix addition
with the translation terms. Here, points are specified by three numbers instead
of two. This coordinate system is called homogenous coordinate system and it allows us to express all
transformation equations as matrix multiplication.

The homogenous coordinate is represented by a triplet (X

_{w}, Y_{w}, W) where
x= X

_{w}/Wandy = X_{w}/W
For two-dimensional transformations, we have the
homogenous parameter W to be any non zero value. But it is convenient to have W
= 1. Therefore, each two-dimensional position can be represented with
homogenous coordinate as (x, y, 1).

Summing it all up, we can say that the homogenous
coordinates allow combined transformation, eliminating the calculation of
intermediate coordinate values and thus save required time for transformation
and memory required to store the intermediate coordinate values. Let us see the
homogenous coordinates for three basic transformations.

To rotate about an arbitrary point, (x

_{p}, y_{p}) we have to carry out three steps:
1. Translate
point (x

_{p}, y_{p}) to the origin
2. Rotate
it about the origin and

3. Finally, translate the center of rotation
back where it belongs

Therefore, the overall transformation matrix for a
counterclockwise rotation by an angle 6 about the point (x

_{p}, y_{p}) is given as
Example

Perform
a counterclockwise 45°
rotation of triangle a (2, 3), B (5, 5), C (4, 3) about point (1, 1).

## No comments:

## Post a Comment