Second Year Diploma Courses in Computer Science & Engineering
/ Computer Engineering / Computer Technology / Information Technology Branch.
Computer Graphics
As per MSBTE ‘I’ Scheme Syllabus
CGR-22318
Unit-III
OVERVIEW OF
TRANSFORMATIONS
Total Marks- 18
Contents:
3.1 Two Dimensional Transformations:
3.1.1 Translation,
3.1.2 Scaling,
3.1.3 Rotation,
3.1.4 Reflection,
3.1.5 Shearing.
3.2 Matrix representations and homogeneous coordinates:
3.2.1 Translation
3.2.2 Scaling,
3.2.3 Rotation,
3.2.4 Reflection,
3.2.5 Shearing.
3.3 Composite Transformations- rotation about an arbitrary point.
3.4 Three dimensional Transformations:
Translation, Scaling, Rotation.
3.5 Types of Projections: Perspective and Parallel projection.
, Unit-III Overview of Transformations
Unit-III Overview of Transformations
3.1 Two Dimensional Transformations:
To make changes in an image is called as transformation. When transformation takes place on a 2D
plane that is x & y coordinates, It is called as two dimensional transformation.
Transformations play an important role in computer graphics to reposition the graphics on the screen and
change their size or orientation.
There are different types of transformations-
A. Basic geometric transformations –
These transformations are most useful and most commonly used.
1 Translation (Position)
2 Scaling (Size)
3 Rotation (Orientation)
B. Other transformation –
These transformations are useful in certain applications.
4 Reflection (Mirror)
5 Shear (Size)
1 Translation:
Translation is the process of changing the position of an object in a straight-line path from one co-
ordinate location to another co-ordinate location.
You can translate a point in 2D by adding translation coordinate (tx, ty) to the original coordinate (X, Y) to
get the new coordinate (X’, Y’). as shown in fig. below-
From the above figure, you can write that −
X’ = X + tx
Y’ = Y + ty
The pair (tx, ty) is called the translation vector or shift vector.
The above equations can also be represented using the column vectors.
P’= P= T=
= +
We can write it as −
P’ = P + T
CGR-22318 www.freestudyroom.xyz Page 2
, Unit-III Overview of Transformations
Example:
1. Translate the polygon with co-ordinates A (3, 6), B (8, 11), & C (11, 3) by 2 units in X direction
and 3 units in Y direction.
x’=x + tx
x’=y + ty
tx=2
ty=3
for point A(3,6)
x’=3+2=5
y’=6+3=9
for point B(8,11)
x’=8+2=10
y’=11+3=14
for point C(11,3)
x’=11+2=13
y’=3+3=6
A’=(x’,y’)=(5,9)
B’=(x’,y’)=(10,14)
C’=(x’,y’)=(13,6)
14
11 13
10 12
9 11
8
10
7
9
6 8
5 7
4 6
3 5
2 4
1 3
1 2
2 3 4 5 6 7 8 9 10 11
1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CGR-22318 www.freestudyroom.xyz Page 3
/ Computer Engineering / Computer Technology / Information Technology Branch.
Computer Graphics
As per MSBTE ‘I’ Scheme Syllabus
CGR-22318
Unit-III
OVERVIEW OF
TRANSFORMATIONS
Total Marks- 18
Contents:
3.1 Two Dimensional Transformations:
3.1.1 Translation,
3.1.2 Scaling,
3.1.3 Rotation,
3.1.4 Reflection,
3.1.5 Shearing.
3.2 Matrix representations and homogeneous coordinates:
3.2.1 Translation
3.2.2 Scaling,
3.2.3 Rotation,
3.2.4 Reflection,
3.2.5 Shearing.
3.3 Composite Transformations- rotation about an arbitrary point.
3.4 Three dimensional Transformations:
Translation, Scaling, Rotation.
3.5 Types of Projections: Perspective and Parallel projection.
, Unit-III Overview of Transformations
Unit-III Overview of Transformations
3.1 Two Dimensional Transformations:
To make changes in an image is called as transformation. When transformation takes place on a 2D
plane that is x & y coordinates, It is called as two dimensional transformation.
Transformations play an important role in computer graphics to reposition the graphics on the screen and
change their size or orientation.
There are different types of transformations-
A. Basic geometric transformations –
These transformations are most useful and most commonly used.
1 Translation (Position)
2 Scaling (Size)
3 Rotation (Orientation)
B. Other transformation –
These transformations are useful in certain applications.
4 Reflection (Mirror)
5 Shear (Size)
1 Translation:
Translation is the process of changing the position of an object in a straight-line path from one co-
ordinate location to another co-ordinate location.
You can translate a point in 2D by adding translation coordinate (tx, ty) to the original coordinate (X, Y) to
get the new coordinate (X’, Y’). as shown in fig. below-
From the above figure, you can write that −
X’ = X + tx
Y’ = Y + ty
The pair (tx, ty) is called the translation vector or shift vector.
The above equations can also be represented using the column vectors.
P’= P= T=
= +
We can write it as −
P’ = P + T
CGR-22318 www.freestudyroom.xyz Page 2
, Unit-III Overview of Transformations
Example:
1. Translate the polygon with co-ordinates A (3, 6), B (8, 11), & C (11, 3) by 2 units in X direction
and 3 units in Y direction.
x’=x + tx
x’=y + ty
tx=2
ty=3
for point A(3,6)
x’=3+2=5
y’=6+3=9
for point B(8,11)
x’=8+2=10
y’=11+3=14
for point C(11,3)
x’=11+2=13
y’=3+3=6
A’=(x’,y’)=(5,9)
B’=(x’,y’)=(10,14)
C’=(x’,y’)=(13,6)
14
11 13
10 12
9 11
8
10
7
9
6 8
5 7
4 6
3 5
2 4
1 3
1 2
2 3 4 5 6 7 8 9 10 11
1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
CGR-22318 www.freestudyroom.xyz Page 3