SlideShare a Scribd company logo
1 of 29
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
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

Composite transformations
Composite transformationsComposite transformations
Composite transformationsMohd Arif
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformationsMohd Arif
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in GraphicsRajani Thite
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithmMani Kanth
 
Matrix representation- CG.pptx
Matrix representation- CG.pptxMatrix representation- CG.pptx
Matrix representation- CG.pptxRubaNagarajan
 
Composite transformation
Composite transformationComposite transformation
Composite transformationPooja Dixit
 
Unit 3
Unit 3Unit 3
Unit 3ypnrao
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphicssabbirantor
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesOmprakash Chauhan
 
Polygons - Computer Graphics - Notes
Polygons - Computer Graphics - NotesPolygons - Computer Graphics - Notes
Polygons - Computer Graphics - NotesOmprakash Chauhan
 
Polygon filling algorithm
Polygon filling algorithmPolygon filling algorithm
Polygon filling algorithmAparna Joshi
 
Attributes of Output Primitives
Attributes of Output PrimitivesAttributes of Output Primitives
Attributes of Output PrimitivesRenita Santhmayora
 
Computer graphics chapter 4
Computer graphics chapter 4Computer graphics chapter 4
Computer graphics chapter 4PrathimaBaliga
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphicsKALESHWAR KUMAR
 
Parallel projection
Parallel projectionParallel projection
Parallel projectionPrince Shahu
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output PrimitivesPrathimaBaliga
 

What's hot (20)

Dda algorithm
Dda algorithmDda algorithm
Dda algorithm
 
Composite transformations
Composite transformationsComposite transformations
Composite transformations
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in Graphics
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithm
 
Matrix representation- CG.pptx
Matrix representation- CG.pptxMatrix representation- CG.pptx
Matrix representation- CG.pptx
 
Composite transformation
Composite transformationComposite transformation
Composite transformation
 
Unit 3
Unit 3Unit 3
Unit 3
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 
Spline representations
Spline representationsSpline representations
Spline representations
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
 
Polygons - Computer Graphics - Notes
Polygons - Computer Graphics - NotesPolygons - Computer Graphics - Notes
Polygons - Computer Graphics - Notes
 
Polygon filling algorithm
Polygon filling algorithmPolygon filling algorithm
Polygon filling algorithm
 
Attributes of Output Primitives
Attributes of Output PrimitivesAttributes of Output Primitives
Attributes of Output Primitives
 
Computer graphics chapter 4
Computer graphics chapter 4Computer graphics chapter 4
Computer graphics chapter 4
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
 
Parallel projection
Parallel projectionParallel projection
Parallel projection
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output Primitives
 

Similar to 2D transformation (Computer Graphics)

2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)Amit Kapoor
 
2Dand3D transformationppt.pptx
2Dand3D transformationppt.pptx2Dand3D transformationppt.pptx
2Dand3D transformationppt.pptxRAMESHCHANDRANE
 
Computer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2DComputer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2D2013901097
 
Bla b__________________la -2&3d -DD .ppt
Bla b__________________la -2&3d -DD .pptBla b__________________la -2&3d -DD .ppt
Bla b__________________la -2&3d -DD .pptkdemersal
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transformPatel Punit
 
2 d transformation
2 d transformation2 d transformation
2 d transformationAnkit Garg
 
Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 dxyz120
 
moule 3 ppt1 basic 2D transformations.pptx
moule 3 ppt1 basic 2D transformations.pptxmoule 3 ppt1 basic 2D transformations.pptx
moule 3 ppt1 basic 2D transformations.pptxRADHIKAB20
 
Coordinatetransformation 130405095156-phpapp01-converted
Coordinatetransformation 130405095156-phpapp01-convertedCoordinatetransformation 130405095156-phpapp01-converted
Coordinatetransformation 130405095156-phpapp01-convertedthe university of Lahore
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformationsNareek
 
Introduction of Transformations (1).pptx
Introduction of Transformations (1).pptxIntroduction of Transformations (1).pptx
Introduction of Transformations (1).pptxChumchumKumar
 
2D Transformation
2D Transformation2D Transformation
2D TransformationShahDhruv21
 

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

2d transformation
2d transformation2d transformation
2d transformation
 
2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)2 d transformations by amit kumar (maimt)
2 d transformations by amit kumar (maimt)
 
06.Transformation.ppt
06.Transformation.ppt06.Transformation.ppt
06.Transformation.ppt
 
Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
 
2Dand3D transformationppt.pptx
2Dand3D transformationppt.pptx2Dand3D transformationppt.pptx
2Dand3D transformationppt.pptx
 
Computer Graphics - transformations in 2d
Computer Graphics - transformations in 2dComputer Graphics - transformations in 2d
Computer Graphics - transformations in 2d
 
Computer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2DComputer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2D
 
Bla b__________________la -2&3d -DD .ppt
Bla b__________________la -2&3d -DD .pptBla b__________________la -2&3d -DD .ppt
Bla b__________________la -2&3d -DD .ppt
 
Transforms UNIt 2
Transforms UNIt 2 Transforms UNIt 2
Transforms UNIt 2
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
2 d transformation
2 d transformation2 d transformation
2 d transformation
 
2 d transformations
2 d transformations2 d transformations
2 d transformations
 
Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 d
 
2D Transformation.pdf
2D Transformation.pdf2D Transformation.pdf
2D Transformation.pdf
 
2D transformations
2D transformations2D transformations
2D transformations
 
moule 3 ppt1 basic 2D transformations.pptx
moule 3 ppt1 basic 2D transformations.pptxmoule 3 ppt1 basic 2D transformations.pptx
moule 3 ppt1 basic 2D transformations.pptx
 
Coordinatetransformation 130405095156-phpapp01-converted
Coordinatetransformation 130405095156-phpapp01-convertedCoordinatetransformation 130405095156-phpapp01-converted
Coordinatetransformation 130405095156-phpapp01-converted
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
Introduction of Transformations (1).pptx
Introduction of Transformations (1).pptxIntroduction of Transformations (1).pptx
Introduction of Transformations (1).pptx
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 

Recently uploaded

Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxfenichawla
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 

Recently uploaded (20)

Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 

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
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. CONCLUSION To manipulate the initially created object and to display the modified object without having to redraw it, we use Transformations.