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
y
P’ = x’
y’
T= tx
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 +
5
3 =
4
5
9
❖ B’ = B + T
= 7
10
C’ = C + T
+ 3 =
4
10
14
❖
= 10 + 3 =
2 4
13
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 =
- cos
cos45
-sin45
= 1/√2
sin45
cos45
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
= x . Sx y . Sy
❖ Therefore , we have
x’ y’ 1 = x y 1 Sx 0 0
0 Sy 0
0 0 1
1
CONCLUSION
T o manipulate the initially created
object and to display the
modified object without having to
redraw it, we use
Transformations.
THANK YOU

More Related Content

Similar to 2Dand3D transformationppt.pptx

2 d transformation
2 d transformation2 d transformation
2 d transformationAnkit Garg
 
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
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transformPatel Punit
 
2D Transformation
2D Transformation2D Transformation
2D TransformationShahDhruv21
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformationsMohd Arif
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformationsNareek
 
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptxHarikumar Rajasekar
 
Introduction of Transformations (1).pptx
Introduction of Transformations (1).pptxIntroduction of Transformations (1).pptx
Introduction of Transformations (1).pptxChumchumKumar
 
Computer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2DComputer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2D2013901097
 
Lecture 6-1543909797
Lecture 6-1543909797Lecture 6-1543909797
Lecture 6-1543909797Canh Le
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformationsAmol Gaikwad
 
2d-transformation
2d-transformation2d-transformation
2d-transformationPooja Dixit
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2aravindangc
 
2D Translation.pdf
2D Translation.pdf2D Translation.pdf
2D Translation.pdfMehulMunshi3
 

Similar to 2Dand3D transformationppt.pptx (20)

2 d transformation
2 d transformation2 d transformation
2 d 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)
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
2 d transformations
2 d transformations2 d transformations
2 d transformations
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
 
Introduction of Transformations (1).pptx
Introduction of Transformations (1).pptxIntroduction of Transformations (1).pptx
Introduction of Transformations (1).pptx
 
Computer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2DComputer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2D
 
Computer Graphics - transformations in 2d
Computer Graphics - transformations in 2dComputer Graphics - transformations in 2d
Computer Graphics - transformations in 2d
 
2D transformations
2D transformations2D transformations
2D transformations
 
2d transformation
2d transformation2d transformation
2d transformation
 
Lecture 6-1543909797
Lecture 6-1543909797Lecture 6-1543909797
Lecture 6-1543909797
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
 
2d-transformation
2d-transformation2d-transformation
2d-transformation
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
2D Translation.pdf
2D Translation.pdf2D Translation.pdf
2D Translation.pdf
 
2-D Transformations.pdf
2-D Transformations.pdf2-D Transformations.pdf
2-D Transformations.pdf
 

More from RAMESHCHANDRANE

Definition of management.pptx
Definition of management.pptxDefinition of management.pptx
Definition of management.pptxRAMESHCHANDRANE
 
presentationoncamanfollowers-130211063317-phpapp01 (1).pptx
presentationoncamanfollowers-130211063317-phpapp01 (1).pptxpresentationoncamanfollowers-130211063317-phpapp01 (1).pptx
presentationoncamanfollowers-130211063317-phpapp01 (1).pptxRAMESHCHANDRANE
 
flexiblemanufacturingsystemfinal-140930090437-phpapp02 (1) (1).pptx
flexiblemanufacturingsystemfinal-140930090437-phpapp02 (1) (1).pptxflexiblemanufacturingsystemfinal-140930090437-phpapp02 (1) (1).pptx
flexiblemanufacturingsystemfinal-140930090437-phpapp02 (1) (1).pptxRAMESHCHANDRANE
 
dual fuel engine MANI.pptx
dual fuel engine MANI.pptxdual fuel engine MANI.pptx
dual fuel engine MANI.pptxRAMESHCHANDRANE
 
Management of the best foreign policymakers
Management of the best foreign policymakersManagement of the best foreign policymakers
Management of the best foreign policymakersRAMESHCHANDRANE
 
AIR SUSPENSION SEMINARY in the wayside you so much
AIR SUSPENSION SEMINARY in the wayside you so muchAIR SUSPENSION SEMINARY in the wayside you so much
AIR SUSPENSION SEMINARY in the wayside you so muchRAMESHCHANDRANE
 
green engineering and technology admission
green engineering and technology admissiongreen engineering and technology admission
green engineering and technology admissionRAMESHCHANDRANE
 
Wheel Steering Syste.pdf
Wheel Steering Syste.pdfWheel Steering Syste.pdf
Wheel Steering Syste.pdfRAMESHCHANDRANE
 
WET SUMP LUBRICATION SYSTEM.ppt
WET SUMP LUBRICATION SYSTEM.pptWET SUMP LUBRICATION SYSTEM.ppt
WET SUMP LUBRICATION SYSTEM.pptRAMESHCHANDRANE
 

More from RAMESHCHANDRANE (20)

e6ce0a4af2b3402b.pptx
e6ce0a4af2b3402b.pptxe6ce0a4af2b3402b.pptx
e6ce0a4af2b3402b.pptx
 
BELT CONVEYER.pptx
BELT CONVEYER.pptxBELT CONVEYER.pptx
BELT CONVEYER.pptx
 
Definition of management.pptx
Definition of management.pptxDefinition of management.pptx
Definition of management.pptx
 
Function of cam.pptx
Function of cam.pptxFunction of cam.pptx
Function of cam.pptx
 
presentationoncamanfollowers-130211063317-phpapp01 (1).pptx
presentationoncamanfollowers-130211063317-phpapp01 (1).pptxpresentationoncamanfollowers-130211063317-phpapp01 (1).pptx
presentationoncamanfollowers-130211063317-phpapp01 (1).pptx
 
ABC Analysis ppt.pptx
ABC Analysis ppt.pptxABC Analysis ppt.pptx
ABC Analysis ppt.pptx
 
flexiblemanufacturingsystemfinal-140930090437-phpapp02 (1) (1).pptx
flexiblemanufacturingsystemfinal-140930090437-phpapp02 (1) (1).pptxflexiblemanufacturingsystemfinal-140930090437-phpapp02 (1) (1).pptx
flexiblemanufacturingsystemfinal-140930090437-phpapp02 (1) (1).pptx
 
dual fuel engine MANI.pptx
dual fuel engine MANI.pptxdual fuel engine MANI.pptx
dual fuel engine MANI.pptx
 
Management of the best foreign policymakers
Management of the best foreign policymakersManagement of the best foreign policymakers
Management of the best foreign policymakers
 
AIR SUSPENSION SEMINARY in the wayside you so much
AIR SUSPENSION SEMINARY in the wayside you so muchAIR SUSPENSION SEMINARY in the wayside you so much
AIR SUSPENSION SEMINARY in the wayside you so much
 
green engineering and technology admission
green engineering and technology admissiongreen engineering and technology admission
green engineering and technology admission
 
Carburettor.pdf
Carburettor.pdfCarburettor.pdf
Carburettor.pdf
 
jet engine.pdf
jet engine.pdfjet engine.pdf
jet engine.pdf
 
AUTONOMOUS CAR.pptx
AUTONOMOUS CAR.pptxAUTONOMOUS CAR.pptx
AUTONOMOUS CAR.pptx
 
Wheel Steering Syste.pdf
Wheel Steering Syste.pdfWheel Steering Syste.pdf
Wheel Steering Syste.pdf
 
SOLAR COOLING.ppt
SOLAR COOLING.pptSOLAR COOLING.ppt
SOLAR COOLING.ppt
 
History of Glass.ppt
History of Glass.pptHistory of Glass.ppt
History of Glass.ppt
 
WET SUMP LUBRICATION SYSTEM.ppt
WET SUMP LUBRICATION SYSTEM.pptWET SUMP LUBRICATION SYSTEM.ppt
WET SUMP LUBRICATION SYSTEM.ppt
 
SOLAR PANEL.pptx
SOLAR PANEL.pptxSOLAR PANEL.pptx
SOLAR PANEL.pptx
 
green_engine_ppt.ppt
green_engine_ppt.pptgreen_engine_ppt.ppt
green_engine_ppt.ppt
 

Recently uploaded

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSRajkumarAkumalla
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 

Recently uploaded (20)

Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
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
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICSHARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
HARDNESS, FRACTURE TOUGHNESS AND STRENGTH OF CERAMICS
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 

2Dand3D transformationppt.pptx

  • 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 y P’ = x’ y’ T= tx 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 + 5 3 = 4 5 9 ❖ B’ = B + T = 7 10 C’ = C + T + 3 = 4 10 14 ❖ = 10 + 3 = 2 4 13 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 = - cos cos45 -sin45 = 1/√2 sin45 cos45 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 = x . Sx y . Sy ❖ Therefore , we have x’ y’ 1 = x y 1 Sx 0 0 0 Sy 0 0 0 1 1
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28. CONCLUSION T o manipulate the initially created object and to display the modified object without having to redraw it, we use Transformations.