SlideShare a Scribd company logo
2D TRANSFORMATIONS
COMPUTER GRAPHICS
2D Transformations
“Transformations are the operations applied to
geometrical description of an object to change its
position, orientation, or size are called geometric
transformations”.
Translation
 Translation is a process of changing the position
of an object in a straight-line path from one co-
ordinate location to another.
 We can translate a two dimensional point by
adding translation distances, tx and ty.
 Suppose the original position is (x ,y) then new
position is (x’, y’).
 Here x’=x + tx and y’=y + ty.
Click icon to add picture
Translation
 Matrix form of the equations:
X’ = X + tx and Y’ = Y + ty is
P = x P’ = x’ T= tx
y y’ ty
 we can write it,
P’= P + T
 Translate a polygon with co-ordinates A(2,5) B(7,10) and C(10,2) by 3
units in X direction and 4 units in Y direction.
 A’ = A +T
= 2 + 3 = 5
5 4 9
 B’ = B + T
= 7 + 3 = 10
10 4 14
 C’ = C + T
= 10 + 3 = 13
2 4 7
Rotation
 A two dimensional rotation is applied to an object by
repositioning it along a circular path in the xy plane.
 Using standard trigonometric equations , we can express
the transformed co-ordinates in terms of
x’ = r cos( coscosr sinsin
y’ = r sin( cosr sin
 The original co-ordinates of the point is
x = r cos
y = r sin
 
Click icon to add picture
After substituting equation 2 in equation 1 we get
x’=x cos
Y’=x sin + y cos
 
Rotation
 That equation can be represented in matrix form
x’ y’ = x y cos
-sin cos
 we can write this equation as,
P’ = P . R
 Where R is a rotation matrix and it is given as
R = cos
-sin cos
  
 A point (4,3) is rotated counterclockwise by angle of 45.
find the rotation matrix and the resultant point.
 R = cos = cos45 sin45
- cos -sin45 cos45
= 1/√2 1/√2
- 1/√2 1/√2
P’ = 4 3 1/√2 1/√2
- 1/√2 1/√2
= 4/√2 – 3/√2 4/√2 + 3/√2
= 1/√2 7/√2
 
Scaling
 A scaling transformation changes the size of an object.
 This operation can be carried out for polygons by
multiplying the co-ordinates values (x , y) of each vertex
by scaling factors Sx and Sy to produce the transformed
co-ordinates (x’ , y’).
x’ = x . Sx
y’ = y . Sy
 In the matrix form
x’ y’ = x y Sx 0
0 Sy
= P . S
Scaling
• Uniform Scaling Un-uniform Scaling
Homogeneous co-ordinates for Translation
 The homogeneous co-ordinates for translation are given as
T = 1 0 0
0 1 0
tx ty 1
 Therefore , we have
x’ y’ 1 = x y 1 1 0 0
0 1 0
tx ty 1
= x + tx y + ty 1
Homogeneous co-ordinates for rotation
 The homogeneous co-ordinates for rotation are given as
R = cos sin
-sin cos
0 0 1
 Therefore , we have
x’ y’ 1 = x y 1 cos sin
-sin cos
0 0 1
= x cos - y sin x sin + y cos 1
  
Homogeneous co-ordinates for scaling
 The homogeneous co-ordinate for scaling are given as
S = Sx 0 0
0 Sy 0
0 0 1
 Therefore , we have
x’ y’ 1 = x y 1 Sx 0 0
0 Sy 0
0 0 1
= x . Sx y . Sy 1
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
CONCLUSION
To manipulate the initially created
object and to display the
modified object without having to
redraw it, we use
Transformations.
THANK YOU

More Related Content

What's hot (20)

PDF
COLOR CRT MONITORS IN COMPUTER GRAPHICS
nehrurevathy
 
PPT
Raster scan system
Mohd Arif
 
PPT
Visible surface detection in computer graphic
anku2266
 
PPT
Line drawing algo.
Mohd Arif
 
PPTX
Back face detection
Pooja Dixit
 
PPTX
Depth Buffer Method
Ummiya Mohammedi
 
PPTX
Raster scan systems with video controller and display processor
hemanth kumar
 
PPTX
Video display devices
shalinikarunakaran1
 
PPT
Quadric surfaces
Ankur Kumar
 
PPTX
Polygon filling algorithm
Aparna Joshi
 
PPTX
Projection In Computer Graphics
Sanu Philip
 
PPTX
sutherland- Hodgeman Polygon clipping
Arvind Kumar
 
PPTX
Computer graphics chapter 4
PrathimaBaliga
 
PPTX
3D Transformation in Computer Graphics
sabbirantor
 
PPTX
Computer Graphics: Visible surface detection methods
Joseph Charles
 
PPTX
Spline representations
Nikhil krishnan
 
PPTX
Dda algorithm
Mani Kanth
 
PPTX
Circle generation algorithm
Ankit Garg
 
PDF
Unit 3
ypnrao
 
PDF
4. THREE DIMENSIONAL DISPLAY METHODS
SanthiNivas
 
COLOR CRT MONITORS IN COMPUTER GRAPHICS
nehrurevathy
 
Raster scan system
Mohd Arif
 
Visible surface detection in computer graphic
anku2266
 
Line drawing algo.
Mohd Arif
 
Back face detection
Pooja Dixit
 
Depth Buffer Method
Ummiya Mohammedi
 
Raster scan systems with video controller and display processor
hemanth kumar
 
Video display devices
shalinikarunakaran1
 
Quadric surfaces
Ankur Kumar
 
Polygon filling algorithm
Aparna Joshi
 
Projection In Computer Graphics
Sanu Philip
 
sutherland- Hodgeman Polygon clipping
Arvind Kumar
 
Computer graphics chapter 4
PrathimaBaliga
 
3D Transformation in Computer Graphics
sabbirantor
 
Computer Graphics: Visible surface detection methods
Joseph Charles
 
Spline representations
Nikhil krishnan
 
Dda algorithm
Mani Kanth
 
Circle generation algorithm
Ankit Garg
 
Unit 3
ypnrao
 
4. THREE DIMENSIONAL DISPLAY METHODS
SanthiNivas
 

Similar to 2D transformation (Computer Graphics) (20)

PPTX
2Dand3D transformationppt.pptx
RAMESHCHANDRANE
 
PPT
COMPOSITE TRANSFORMATION COMPUTER GRAPHICDS.ppt
urvashipundir04
 
PDF
Unit-3 overview of transformations
Amol Gaikwad
 
PPTX
moule 3 ppt1 basic 2D transformations.pptx
RADHIKAB20
 
DOC
Unit 3 notes
Balamurugan M
 
PPT
2 d transformations by amit kumar (maimt)
Amit Kapoor
 
PPTX
2D Transformation
ShahDhruv21
 
PPT
“Transformations are the operations applied to geometrical description of an ...
renuka b
 
PPT
06.Transformation.ppt
RobinAhmedSaikat
 
PPTX
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
Harikumar Rajasekar
 
PPT
2d transformation
Sarkunavathi Aribal
 
PPT
2D_transformatiomcomputer graphics 2d translation, rotation and scaling trans...
renuka b
 
PPTX
2D transformations
vijaysharma1265
 
PPTX
Computer Graphic - Transformations in 2D
2013901097
 
PPTX
Computer Graphics - transformations in 2d
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
PPT
2D-Transformations-Transformations are the operations applied to geometrical ...
BINJAD1
 
PPTX
Part 3- Manipulation and Representation of Curves.pptx
Khalil Alhatab
 
PDF
2D Translation.pdf
MehulMunshi3
 
PPTX
Part 2- Geometric Transformation.pptx
Khalil Alhatab
 
PPTX
Part 2- Transformation.pptx
Khalil Alhatab
 
2Dand3D transformationppt.pptx
RAMESHCHANDRANE
 
COMPOSITE TRANSFORMATION COMPUTER GRAPHICDS.ppt
urvashipundir04
 
Unit-3 overview of transformations
Amol Gaikwad
 
moule 3 ppt1 basic 2D transformations.pptx
RADHIKAB20
 
Unit 3 notes
Balamurugan M
 
2 d transformations by amit kumar (maimt)
Amit Kapoor
 
2D Transformation
ShahDhruv21
 
“Transformations are the operations applied to geometrical description of an ...
renuka b
 
06.Transformation.ppt
RobinAhmedSaikat
 
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
Harikumar Rajasekar
 
2d transformation
Sarkunavathi Aribal
 
2D_transformatiomcomputer graphics 2d translation, rotation and scaling trans...
renuka b
 
2D transformations
vijaysharma1265
 
Computer Graphic - Transformations in 2D
2013901097
 
Computer Graphics - transformations in 2d
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
2D-Transformations-Transformations are the operations applied to geometrical ...
BINJAD1
 
Part 3- Manipulation and Representation of Curves.pptx
Khalil Alhatab
 
2D Translation.pdf
MehulMunshi3
 
Part 2- Geometric Transformation.pptx
Khalil Alhatab
 
Part 2- Transformation.pptx
Khalil Alhatab
 
Ad

Recently uploaded (20)

PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PPTX
Functions in Python Programming Language
BeulahS2
 
PPTX
Explore USA’s Best Structural And Non Structural Steel Detailing
Silicon Engineering Consultants LLC
 
PPTX
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
PPTX
Fundamentals of Quantitative Design and Analysis.pptx
aliali240367
 
PDF
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
PDF
Información de microsoft purview herramienta de microsoft
macarenabenitez6
 
PPTX
Distribution reservoir and service storage pptx
dhanashree78
 
PPTX
L300 Technical Slide Library_Feb 2025 microsoft purview
macarenabenitez6
 
PDF
William Stallings - Foundations of Modern Networking_ SDN, NFV, QoE, IoT, and...
lavanya896395
 
PPT
FINAL plumbing code for board exam passer
MattKristopherDiaz
 
PDF
Digital water marking system project report
Kamal Acharya
 
PPTX
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
PPTX
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
PDF
Module - 4 Machine Learning -22ISE62.pdf
Dr. Shivashankar
 
PDF
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
PPTX
Unit_I Functional Units, Instruction Sets.pptx
logaprakash9
 
PDF
PROGRAMMING REQUESTS/RESPONSES WITH GREATFREE IN THE CLOUD ENVIRONMENT
samueljackson3773
 
PDF
Artificial intelligence,WHAT IS AI ALL ABOUT AI....pdf
Himani271945
 
PDF
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
Functions in Python Programming Language
BeulahS2
 
Explore USA’s Best Structural And Non Structural Steel Detailing
Silicon Engineering Consultants LLC
 
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
Fundamentals of Quantitative Design and Analysis.pptx
aliali240367
 
methodology-driven-mbse-murphy-july-hsv-huntsville6680038572db67488e78ff00003...
henriqueltorres1
 
Información de microsoft purview herramienta de microsoft
macarenabenitez6
 
Distribution reservoir and service storage pptx
dhanashree78
 
L300 Technical Slide Library_Feb 2025 microsoft purview
macarenabenitez6
 
William Stallings - Foundations of Modern Networking_ SDN, NFV, QoE, IoT, and...
lavanya896395
 
FINAL plumbing code for board exam passer
MattKristopherDiaz
 
Digital water marking system project report
Kamal Acharya
 
Engineering Quiz ShowEngineering Quiz Show
CalvinLabial
 
Numerical-Solutions-of-Ordinary-Differential-Equations.pptx
SAMUKTHAARM
 
Module - 4 Machine Learning -22ISE62.pdf
Dr. Shivashankar
 
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
Ashutosh Satapathy
 
Unit_I Functional Units, Instruction Sets.pptx
logaprakash9
 
PROGRAMMING REQUESTS/RESPONSES WITH GREATFREE IN THE CLOUD ENVIRONMENT
samueljackson3773
 
Artificial intelligence,WHAT IS AI ALL ABOUT AI....pdf
Himani271945
 
Submit Your Papers-International Journal on Cybernetics & Informatics ( IJCI)
IJCI JOURNAL
 
Ad

2D transformation (Computer Graphics)

  • 2. 2D Transformations “Transformations are the operations applied to geometrical description of an object to change its position, orientation, or size are called geometric transformations”.
  • 3. Translation  Translation is a process of changing the position of an object in a straight-line path from one co- ordinate location to another.  We can translate a two dimensional point by adding translation distances, tx and ty.  Suppose the original position is (x ,y) then new position is (x’, y’).  Here x’=x + tx and y’=y + ty.
  • 4. Click icon to add picture
  • 6.  Matrix form of the equations: X’ = X + tx and Y’ = Y + ty is P = x P’ = x’ T= tx y y’ ty  we can write it, P’= P + T
  • 7.  Translate a polygon with co-ordinates A(2,5) B(7,10) and C(10,2) by 3 units in X direction and 4 units in Y direction.  A’ = A +T = 2 + 3 = 5 5 4 9  B’ = B + T = 7 + 3 = 10 10 4 14  C’ = C + T = 10 + 3 = 13 2 4 7
  • 8. Rotation  A two dimensional rotation is applied to an object by repositioning it along a circular path in the xy plane.  Using standard trigonometric equations , we can express the transformed co-ordinates in terms of x’ = r cos( coscosr sinsin y’ = r sin( cosr sin  The original co-ordinates of the point is x = r cos y = r sin  
  • 9. Click icon to add picture After substituting equation 2 in equation 1 we get x’=x cos Y’=x sin + y cos  
  • 11.  That equation can be represented in matrix form x’ y’ = x y cos -sin cos  we can write this equation as, P’ = P . R  Where R is a rotation matrix and it is given as R = cos -sin cos   
  • 12.  A point (4,3) is rotated counterclockwise by angle of 45. find the rotation matrix and the resultant point.  R = cos = cos45 sin45 - cos -sin45 cos45 = 1/√2 1/√2 - 1/√2 1/√2 P’ = 4 3 1/√2 1/√2 - 1/√2 1/√2 = 4/√2 – 3/√2 4/√2 + 3/√2 = 1/√2 7/√2  
  • 13. Scaling  A scaling transformation changes the size of an object.  This operation can be carried out for polygons by multiplying the co-ordinates values (x , y) of each vertex by scaling factors Sx and Sy to produce the transformed co-ordinates (x’ , y’). x’ = x . Sx y’ = y . Sy  In the matrix form x’ y’ = x y Sx 0 0 Sy = P . S
  • 14. Scaling • Uniform Scaling Un-uniform Scaling
  • 15. Homogeneous co-ordinates for Translation  The homogeneous co-ordinates for translation are given as T = 1 0 0 0 1 0 tx ty 1  Therefore , we have x’ y’ 1 = x y 1 1 0 0 0 1 0 tx ty 1 = x + tx y + ty 1
  • 16. Homogeneous co-ordinates for rotation  The homogeneous co-ordinates for rotation are given as R = cos sin -sin cos 0 0 1  Therefore , we have x’ y’ 1 = x y 1 cos sin -sin cos 0 0 1 = x cos - y sin x sin + y cos 1   
  • 17. Homogeneous co-ordinates for scaling  The homogeneous co-ordinate for scaling are given as S = Sx 0 0 0 Sy 0 0 0 1  Therefore , we have x’ y’ 1 = x y 1 Sx 0 0 0 Sy 0 0 0 1 = x . Sx y . Sy 1
  • 28. CONCLUSION To manipulate the initially created object and to display the modified object without having to redraw it, we use Transformations.