Transformations
Dr P. RAVINDER REDDY
Professor
Dept. of Mechanical Engineering,
Chaitanya Bharathi Institute of Technology
Hyderabad-500 075,AP
Email: ravinderreddyp_mech@[Link]
UNIT - I
Geometric Transformations: 2d Translation,
Scaling, Rotation, Reflection and shearing,
Homogeneous Coordinates, Rotation and Scaling
about arbitrary points
3D transformations, Windowing - View ports -
Clipping transformations
Transformations
• 2D transformation: Translation, Rotation, Scaling
• Matrix Representation
• Homogeneous Coordinates
• Reflection and shearing
• Rotation and Scaling about arbitrary points
• Combination of Transformations
• 3D Transformations: Translation, Rotation, Scaling
• Windowing - View ports -Clipping transformations
• A graphics system should allow the programmer to
define pictures that include a variety of transformations.
He should be able to magnify a picture so that detail
appears more clearly, or reduce it so that more of the
picture is visible.
Two aspects of the formulation of transformations
should be emphasized:
1. A transformation is a single mathematical entity and as
such can be denoted by a single name or symbol.
2. Two transformations can be combined, or
concatenated, to yield a single transformation with the
same effect as the sequential application of the original
two. Thus transformation A might be a translation and
transformation B a scaling. The concatenation property
allows us to determine a transformation C =AB whose
effect is to translate and then scale.
1. Translation
Concatenation
• Sequence of transformations can be combined into
one transformation by the concatenation process.
• Use of the concatenated transformation has several
advantages. We can represent it more compactly
than a sequence, and we can generally compute the
transformation with fewer arithmetic operations
than if we were to apply each of the transformations
in the sequence one after the other.
• However the rules for concatenating transformation
equations are quite complex. They are much simpler
if we use matrices to define transform actions.
Homogeneous coordinates
• The uniform matrix array is used to combine
the transformation for the easy of matrix
operations. Normally a 3 x 3 uniform
coordinates are used for 2D transformations
and 4x4 uniform array for 3D transformations.
This process is known as Homogeneous
coordinate system.
Rotation about an Arbitrary Point
• Now let’s determine the transformation matrix for
a counter clockwise rotation about point (xc, yc)
• We shall do this by three transformation steps.
1. We shall translate the point (xc, yc) to the origin,
2. Rotate about the origin, by angle θ and
3. Then translate the centre of rotation back where it
belongs.
The translation which moves (xc, yc) to the origin is given by
The rotation about origin by angle θ in counter clockwise direction is
given by
and the translation to move the centre point back to its correct
position is
The combined transformation is given by C=T1 R T2
Other Transformations
Other Transformations
Prob1: Derive the transformation that rotates point P by an angle θ
about the origin. Write the matrix representation for this rotation .
Prob4: Magnify the triangle with vertices A (0, 0), B (1, 1) and C
(5, 2) to twice its size while keeping C(5, 2) fixed.
3D Transformations
Rotation Transformation
Windowing and Viewport
• Windrowing & View port
• A world coordinate area selected for display for
display is called ‘window’. An area on a display
device to which a window is mapped is called a
‘view port’.
• The window is defined what is to be viewed
• View port defines where it is to be displayed
• The mapping of a part of world - coordinate scene
to device coordinates is referred to as a viewing
transformation(Bridge between two).
References
Text Books:
• 1. Ibrahim Zeid, “CAD/CAM Theory and Practice”,
Mc Graw Hill, 1998.
• 2. Foley, Van Dam, Feiner and Hughes, “Computer
Graphics Principles and Practice”, 2/e., Addison
Wesley, 2000.
Suggested Reading:
1. E. Michael, “Geometric Modelling”, John Wiley &
Sons, 1995. 2. Hill Jr, F.S., “Computer Graphics
using open GL”, Pearson Education, 2003.