3.1 2D-Transformaton
3.1 2D-Transformaton
3.1 2D-Transformaton
MODULE – 3 : 2D TRANSFORMATIONS
Changes in orientation, size, and shape are accomplished with geometric
transformations that alter the coordinate descriptions of objects. The basic geometric
transformations are:
➢ Translation,
➢ Rotation,
➢ Scaling.
Other transformations that are often applied to objects include:
➢ Reflection
➢ Shear.
1. TRANSLATION
• A translation is applied to an object by repositioning it along a straight-line path
from one coordinate location to another.
• A two-dimensional point translated by adding translation distances, tx, and ty,
to the original coordinate position (x, y) to move the point to a new position
( x ' , y').
Matrix representation
2. ROTATION
• A two-dimensional rotation is applied to an object by repositioning it along a
circular path in the xy plane.
• To generate a rotation, we specify a rotation angle and the position (xr, yr) of
the rotation point (or pivot point) about which the object is to be rotated .
• Positive values for the rotation angle define counterclockwise rotations about
the pivot point, as in above, and negative values rotate objects in the clockwise
direction.
UNIT 3 3
In this figure, ‘r ‘ is the constant distance of the point from the origin, angle
‘ ’ is the original angular position of the point from the horizontal, and ‘ ’ is the
rotation angle.
Fig: Rotating a point from position (x, y) to position ( x ' ,y ' ) through an angle
about rotation point ( xr , yr ).
3. SCALING
A scaling transformation alters 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 Sx, and Sy, to produce the transformed coordinates (x', y'):
• Scaling factor Sx, scales objects in the ‘x’ direction, while Sy scales in the ‘y’
direction.
• Any positive numeric values can be assigned to the scaling factors Sx, and Sy.
Values less than 1 reduce the size of objects; values greater than 1 produce an
enlargement.
When Sx, and Sy, are assigned the same value, a uniform scaling is produced
that maintains relative object proportions. Unequal values for Sx, and Sy, result in a
differential scaling.
OTHER TRANSFORMATIONS
4. REFLECTION
Reflection is the mirror image of original object. The mirror image for a two-
dimensional reflection is generated relative to an axis of reflection by rotating the
object 1800 about the reflection axis.
X – axis Reflection
Reflections about the line y=0,the x – axis ,is accomplished with the
transformation matrix:
UNIT 3 6
Y – axis Reflection
A reflections about the y - axis ,flips ‘x’ co ordinate while keeping ‘y’ co
ordinate the same .The transformation matrix is:
About origin
The reflection relative to the coordinate origin, has the matrix representation :
2. Shear
A transformation that distorts the shape of an object such that the transformed
shape appears as if the object were composed of internal layers that had been caused
to slide over each other is called a Shear.
There are two shear transformations X-Shear and Y-Shear. One shifts X
coordinates values and other shifts Y coordinate values.
UNIT 3 7
X-Shear
Y-Shear
The Y-Shear preserves the X coordinates and changes the Y coordinates which
causes the horizontal lines to transform into lines which slopes up or down as shown
in the following figure.