You are on page 1of 34

Computer Graphics rd

3 Unit
M.A. Zahed
Lecturer in computer
Government Polytechnic Ahmednagar
Objectives
• After learning this unit student can able to
Perform given operation in 2D transformation
Perform given operation in 3D transformation
Solve the given problem using composite transformation
Apply the given type of projection on object
2-D Transformation
What is transformations?
- The geometrical changes of an object from a current state to modified state.
- The process of changing the scale, shape or position of the object is called
as Transformation
- Reflection and shearing are other
Common transformation techniques Basic Transformation
- Scaling and shearing deform the shape Techniques
of the object, so they are not rigid body
transformation Translation
- Translation, Rotation, & Reflection are rigid
Body transformation Scaling

Rotation
Why the transformations is needed?
- To manipulate the initially created object and to display the modified object
without having to redraw it.
2D Transformation
Geometric Transformation
- Alter the coordinates descriptions an object
- Translation, rotation, scaling etc.
- Coordinate system unchanged
Coordinate transformation
- Produce a different coordinate system
Terminology
• 
• 
Translation
• 
Example of translation
• 
Rotation
• 

Identity of
trigonometry
Rotation
• 
Example
• Find the transformed point, P’, caused by rotating P= (5, 1) about the origin
through an angle of 90◦

Original Coordinates Transformed


Coordinate
P(5, 1) P(-1, 5)
Rotation
• 
Rotation
• 
Scaling
• 
Scaling
• 
Scaling Example
• 
Scaling w.r.t. reference point
• 
Scaling
• 
Scaling Example
• 

Original Transformed
Coordinates Coordinated
A(2, 2) A’(1, -2)
B(6, 2) B’(9, -2)
C(8, 12) C’(5, 4)
Matrix Representation & Homogeneous Points

• 
Homogeneous Coordinate Translation
• 
Homogeneous Coordinate Scaling &
Rotation
• 
Composite Transformation
• Composite transformation is any sequence of basic transformation
operations.
• We can generate a composite transformation matrix by multiplying matrices
of basic transformation operations like translation, rotation, scaling,
reflection, shearing.
• Lets say M={M1, M2…Mn} are the transformation matrices of some
transformation operation in the same order, so for column measure matrices
are placed form right to left of transformed coordinated is given as
• P’=Mn,…M2.M1.P
Composite Translation
• 
Composite Rotate
• 
Composite Scaling
• 
Pivot Point rotation
• 
Example Pivot Point Rotation
• 

Original Transformed
A(1,0) A’(1,0)
B(0,0) B’(0.291,-0.709)
C(0,1) C’(-0.148,0)
D(1,1) D’(0.291,0.709)
Pivot Point Scaling
• 
Reflection
• It is a transformation that produce a mirror image of an object. It is obtained
by rotating the object by 180 deg about the reflection axis.
• Doesn’t alter the shape & size of object, so it is rigid body transformation

Reflection Image Reflection Matrix Change in coordinate


on axis
X-axis

Y-axis
Reflection Image Reflection Matrix Change in coordinate
on axis
Y=X-axis

Y=-X axis

Origin
Example on Reflection
• 

Original Composite
Transformation
A(1, 0) A’(0.707, 0.707)
B(0, 0) B’(0, 0)
C(0, 1) C’(-0.707, -0.707)
D(1, 1) D’(0, -1.414)
Shearing
• Shear is 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.
• Two common shearing transformation are those that shift
coordinate
Shearing x values andReflection
Image those that shift y valesChange in coordinate
Matrix
on axis
X-
direction

Y-
Direction
Example
• 

Original coordinate Transformed coordinate


A(0,0) A’(0,0)
B(2,0) B’(2,0)
C(2,2) C’(8,2)
D(0, 2) D’(6, 2)

You might also like