Académique Documents
Professionnel Documents
Culture Documents
Computer Graphics(CS-504)
Presented By:
Bhavna Sharma
Asst. Prof. CSE Dept. (SRIIT)
Applications
Cartography
Entertainment: Cinema
10
11
Transformations
What is transformations?
The geometrical changes of an object from a current
state to modified state.
Why the transformations is needed?
To manipulate the initially created object and to display
the modified object without having to redraw it.
12
Translation
Moving an object is called
translation. We translate an
object by adding x and y
coordinates respectively.
We can write the components:
Xnew = Xold + tx;
Ynew = Yold + ty;
or
in matrix form:
P' = P + T
tx
x
x
y = y + ty
13
Rotation
In Rotation , the object is
rotated degree about the
origin (or a given point).
If is positive angle the
rotation is
-counterclockwise , while
clockwise when it is
negative
14
Scaling
A Scaling transformation
changes the size of an object.
We can write the components:
p'x = sx px
p'y = sy py
or
in matrix form:
P' = S P
sx
S
0
0
s y
15
Other Transformation
Reflection.
Shearing.
16
Reflection
Reflection: A transformation that produces a mirror image.
x-axis
y-axis
1 0 0
0 1 0
0 0 1
1 0 0
0 1 0
0 0 1
17
Reflection
Reflection:
origin
1 0 0
0 1 0
0 0 1
line x=y
0 1 0
1 0 0
0 0 1
18
Shearing
Shearing: A transformation that distorts the shape of an
object.
X-Shear: The x-Shear preserves the y coordinate and
changes are made to X coordinates.
1 shx 0
0 1 0
0 0 1
19
Shearing
Y- Shear: The Y-Shear preserves the X coordinates and
changes the Y coordinates.
1 0 0
sh 1 0
y
0 0 1
20
Composite Transformation
Composite transformations: To perform multiple
transformation .
For Example
Rotate about an arbitrary point translate, rotate,
translate
Scale about an arbitrary point translate, scale,
translate
21
Inverse transformation
When be apply any transformation to an object we get a new
object. Sometimes it may require to undo the applied
transformation. This can be achieve by inverse transformation.
If the inverse of matrix T is (-T). then
T(-T)= I
Here I is the identity matrix.
22
23
Recommended Text:
Rogers, "Procedural Elements of Computer Graphics",
Tata McGraw Hill
Donald Hearn and M.P. Becker Computer Graphics
Pearson Pub.
Parekh Principles of Multimedia Tata McGraw Hill
Maurya, Computer Graphics with Virtual Reality System
, Wiley India
Pakhira,Computer Graphics ,Multimedia & Animation
,PHI learning
Andleigh, Thakral , Multimedia System Design
24
Thanks
25