SlideShare a Scribd company logo
1 of 18
2D-TRANSLATION
&
ROTATION
(W.R.T ORIGIN &PIVOT POINT)
1
TRANSFORMATION
 Transformation means changing some graphics into
something else by applying rules.
 Types
 Translation,
 Scaling
 Rotation,
 Shearing
 Reflection
2
TRANSLATION
 Translation moves an object to a different position
on the screen.
 It can be described as a rigid motion.
 It changes the position of object.
3
TRANSLATION
 A point can be translated in 2D by adding translation
coordinate (tx, ty) to the original coordinate (X, Y) to
get the new coordinate (X’, Y’).
 i.e. X’=X+ tx
Y’=Y+ ty
 (tx, ty) is called the translation vector or shift vector.
4
TRANSLATION
 Matrix
Representation:
 1 0 0
0 1 0
tx ty 1
• (tx ,ty)= translation factor.
5
TRANSLATION
Point Translation Line translation
6
QUESTION
7
Q. Consider a unit square and translate it to 3-units in
x-direction and 3-units in y-direction.
given:
tx=3-units
ty=3-units
Co-ordinates of the unit square: A(0,0);
B(1,0);C(1,1);D(0,1).
ROTATION
8
 Change in orientation.
 Rigid body transformation.
 Types:
 about origin(0,0)
 about a pivot point
ROTATION
9
 About origin:
 In rotation, we rotate the object at particular angle θ
(theta) from its origin.
 It can be described as rigid body transformation.
 It is change in orientation.
 Convention:
Θ positive: rotation counter clockwise.
Θ negative: rotation clockwise.
ROTATION
 The point P(X, Y) is
located at angle φ
from the horizontal X
coordinate with
distance r from the
origin.
 We rotate it at the
angle θ. After rotating
it to a new location,
we get a new point P’
(X’, Y’).
10
ROTATION
11
 Matrix
Representation:
cos θ -sin θ
0
sin θ cos θ
0
0 0
1
 Question:
Rotate a triangle
A(0,0);
B(1,1), C(5,2) about
origin by 45degrees.
Given: angle of
rotation=45
degrees.
ROTATION
12
 About a pivot point:
 Pivot point is the point
of rotation
 Pivot point need not
necessarily be on the
object
(xp , yp)
(x,y)
(x’,y’)
Pivot Point
13
(xp , yp)
(x,y)
(x1, y1)
STEP-1: Translate the pivot point to the origin
ROTATION
14
(x1, y1)
STEP-2: Rotate about the origin
(x2, y2)
ROTATION
15
STEP-3: Translate the pivot point to original
position
(x2, y2)
(xp, yp)
(x’, y’)
ROTATION
ROTATION
16
 About pivot point matrix representation:
1 0 0 1 0 cos θ 1 0 0
0 1 0 0 1 - sin θ 0 1 0
-tx -ty 1 0 0 1 tx ty 1
• (tx,ty)=translation factor
• Θ=angle of rotation.
Question
17
Q. Rotate a triangle with co-ordinates A(0,0);
B(1,1);C(5,2) about a pivot point (1,1) by
45degrees.
Given:
pivot point=(0,0)
angle of rotation=45 degrees.
Step1: translate the triangle to origin.(tx=-1,ty=-1)
Step 2: rotate the triangle by 45degrees.
Step 3: translate the triangle back to the pivot point.
(tx=1, ty=1)
18
THANK YOU

More Related Content

What's hot

seminar on 2D transformation
seminar on 2D transformationseminar on 2D transformation
seminar on 2D transformation9784
 
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
 
3D Geometric Transformations
3D Geometric Transformations3D Geometric Transformations
3D Geometric TransformationsIshan Parekh
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformationSelvakumar Gna
 
2d-transformation
2d-transformation2d-transformation
2d-transformationPooja Dixit
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformationsNareek
 
2 d transformation
2 d transformation2 d transformation
2 d transformationAnkit Garg
 
Geometric transformation 2d chapter 5
Geometric transformation 2d   chapter 5Geometric transformation 2d   chapter 5
Geometric transformation 2d chapter 5geethawilliam
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transformPatel Punit
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics University of Potsdam
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformationsNareek
 
2D Transformation
2D Transformation2D Transformation
2D TransformationShahDhruv21
 
2D Rotation- Transformation in Computer Graphics
2D Rotation- Transformation in Computer Graphics2D Rotation- Transformation in Computer Graphics
2D Rotation- Transformation in Computer GraphicsSusmita
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160Ajay Ochani
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)Timbal Mayank
 

What's hot (20)

seminar on 2D transformation
seminar on 2D transformationseminar on 2D transformation
seminar on 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)
 
3D Geometric Transformations
3D Geometric Transformations3D Geometric Transformations
3D Geometric Transformations
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
 
2d-transformation
2d-transformation2d-transformation
2d-transformation
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
2 d transformation
2 d transformation2 d transformation
2 d transformation
 
transformation 3d
transformation 3dtransformation 3d
transformation 3d
 
Geometric transformation 2d chapter 5
Geometric transformation 2d   chapter 5Geometric transformation 2d   chapter 5
Geometric transformation 2d chapter 5
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformations
 
3 D Graphics
3 D Graphics3 D Graphics
3 D Graphics
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
3d transformation
3d transformation3d transformation
3d transformation
 
2D Rotation- Transformation in Computer Graphics
2D Rotation- Transformation in Computer Graphics2D Rotation- Transformation in Computer Graphics
2D Rotation- Transformation in Computer Graphics
 
3D Transformation
3D Transformation 3D Transformation
3D Transformation
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
 

Similar to 2 d translation

Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformationsAmol Gaikwad
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphicsSHIVANI SONI
 
Two dimensional geometric transformation
Two dimensional geometric transformationTwo dimensional geometric transformation
Two dimensional geometric transformationjapan vasani
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2aravindangc
 
Introduction of Transformations (1).pptx
Introduction of Transformations (1).pptxIntroduction of Transformations (1).pptx
Introduction of Transformations (1).pptxChumchumKumar
 
3 d transformation
3 d transformation3 d transformation
3 d transformationMani Kanth
 
Lecture 6-1543909797
Lecture 6-1543909797Lecture 6-1543909797
Lecture 6-1543909797Canh Le
 
09transformation3d
09transformation3d09transformation3d
09transformation3dKetan Jani
 
Cs8092 computer graphics and multimedia unit 2
Cs8092 computer graphics and multimedia unit 2Cs8092 computer graphics and multimedia unit 2
Cs8092 computer graphics and multimedia unit 2SIMONTHOMAS S
 

Similar to 2 d translation (20)

transformation IT.ppt
transformation IT.ppttransformation IT.ppt
transformation IT.ppt
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
 
06.Transformation.ppt
06.Transformation.ppt06.Transformation.ppt
06.Transformation.ppt
 
2d transformation
2d transformation2d transformation
2d transformation
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
 
Computer Graphics - transformations in 2d
Computer Graphics - transformations in 2dComputer Graphics - transformations in 2d
Computer Graphics - transformations in 2d
 
Two dimensional geometric transformation
Two dimensional geometric transformationTwo dimensional geometric transformation
Two dimensional geometric transformation
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
Transforms UNIt 2
Transforms UNIt 2 Transforms UNIt 2
Transforms UNIt 2
 
Introduction of Transformations (1).pptx
Introduction of Transformations (1).pptxIntroduction of Transformations (1).pptx
Introduction of Transformations (1).pptx
 
3 d transformation
3 d transformation3 d transformation
3 d transformation
 
Lecture 6-1543909797
Lecture 6-1543909797Lecture 6-1543909797
Lecture 6-1543909797
 
09transformation3d
09transformation3d09transformation3d
09transformation3d
 
Module 4.pptx
Module 4.pptxModule 4.pptx
Module 4.pptx
 
2-D Transformations.pdf
2-D Transformations.pdf2-D Transformations.pdf
2-D Transformations.pdf
 
computer graphic.pptx
computer graphic.pptxcomputer graphic.pptx
computer graphic.pptx
 
Cs8092 computer graphics and multimedia unit 2
Cs8092 computer graphics and multimedia unit 2Cs8092 computer graphics and multimedia unit 2
Cs8092 computer graphics and multimedia unit 2
 

More from Mani Kanth

White box testing
White box testing White box testing
White box testing Mani Kanth
 
System testing
System testingSystem testing
System testingMani Kanth
 
management of maintainance
management of maintainancemanagement of maintainance
management of maintainanceMani Kanth
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Mani Kanth
 
Reverse engineering in software engineering vaibhav
Reverse engineering in software engineering vaibhavReverse engineering in software engineering vaibhav
Reverse engineering in software engineering vaibhavMani Kanth
 
Mutation testing 1
Mutation testing 1Mutation testing 1
Mutation testing 1Mani Kanth
 
Mutation testing
Mutation testingMutation testing
Mutation testingMani Kanth
 
Guideline for euivalence class testing
Guideline for euivalence class testingGuideline for euivalence class testing
Guideline for euivalence class testingMani Kanth
 
Equivalence class testing
Equivalence  class testingEquivalence  class testing
Equivalence class testingMani Kanth
 
Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Mani Kanth
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmMani Kanth
 
Seed filling algorithm
Seed filling algorithmSeed filling algorithm
Seed filling algorithmMani Kanth
 
Scaling and shearing
Scaling and shearingScaling and shearing
Scaling and shearingMani Kanth
 
Reflection transformation
Reflection transformationReflection transformation
Reflection transformationMani Kanth
 
Raster and random scan display types of input devices
Raster and random scan display types of input devicesRaster and random scan display types of input devices
Raster and random scan display types of input devicesMani Kanth
 
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithmPolygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithmMani Kanth
 

More from Mani Kanth (20)

White box testing
White box testing White box testing
White box testing
 
Unit testing
Unit testing Unit testing
Unit testing
 
System testing
System testingSystem testing
System testing
 
management of maintainance
management of maintainancemanagement of maintainance
management of maintainance
 
Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)Se (techniques for black box testing ppt)
Se (techniques for black box testing ppt)
 
Reverse engineering in software engineering vaibhav
Reverse engineering in software engineering vaibhavReverse engineering in software engineering vaibhav
Reverse engineering in software engineering vaibhav
 
Mutation testing 1
Mutation testing 1Mutation testing 1
Mutation testing 1
 
Mutation testing
Mutation testingMutation testing
Mutation testing
 
Guideline for euivalence class testing
Guideline for euivalence class testingGuideline for euivalence class testing
Guideline for euivalence class testing
 
Equivalence class testing
Equivalence  class testingEquivalence  class testing
Equivalence class testing
 
Deployment
DeploymentDeployment
Deployment
 
unit testing
unit testingunit testing
unit testing
 
Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...Window to viewport transformation&matrix representation of homogeneous co...
Window to viewport transformation&matrix representation of homogeneous co...
 
The sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithmThe sutherland hodgeman polygon clipping algorithm
The sutherland hodgeman polygon clipping algorithm
 
Seed filling algorithm
Seed filling algorithmSeed filling algorithm
Seed filling algorithm
 
Scaling and shearing
Scaling and shearingScaling and shearing
Scaling and shearing
 
Reflection transformation
Reflection transformationReflection transformation
Reflection transformation
 
Raster and random scan display types of input devices
Raster and random scan display types of input devicesRaster and random scan display types of input devices
Raster and random scan display types of input devices
 
Projection
ProjectionProjection
Projection
 
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithmPolygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
Polygon clipping with sutherland hodgeman algorithm and scan line fill algorithm
 

Recently uploaded

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
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
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
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
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
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
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
 
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
 

Recently uploaded (20)

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
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
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
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
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
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
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 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
 
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
 

2 d translation

  • 2. TRANSFORMATION  Transformation means changing some graphics into something else by applying rules.  Types  Translation,  Scaling  Rotation,  Shearing  Reflection 2
  • 3. TRANSLATION  Translation moves an object to a different position on the screen.  It can be described as a rigid motion.  It changes the position of object. 3
  • 4. TRANSLATION  A point can be translated in 2D by adding translation coordinate (tx, ty) to the original coordinate (X, Y) to get the new coordinate (X’, Y’).  i.e. X’=X+ tx Y’=Y+ ty  (tx, ty) is called the translation vector or shift vector. 4
  • 5. TRANSLATION  Matrix Representation:  1 0 0 0 1 0 tx ty 1 • (tx ,ty)= translation factor. 5
  • 7. QUESTION 7 Q. Consider a unit square and translate it to 3-units in x-direction and 3-units in y-direction. given: tx=3-units ty=3-units Co-ordinates of the unit square: A(0,0); B(1,0);C(1,1);D(0,1).
  • 8. ROTATION 8  Change in orientation.  Rigid body transformation.  Types:  about origin(0,0)  about a pivot point
  • 9. ROTATION 9  About origin:  In rotation, we rotate the object at particular angle θ (theta) from its origin.  It can be described as rigid body transformation.  It is change in orientation.  Convention: Θ positive: rotation counter clockwise. Θ negative: rotation clockwise.
  • 10. ROTATION  The point P(X, Y) is located at angle φ from the horizontal X coordinate with distance r from the origin.  We rotate it at the angle θ. After rotating it to a new location, we get a new point P’ (X’, Y’). 10
  • 11. ROTATION 11  Matrix Representation: cos θ -sin θ 0 sin θ cos θ 0 0 0 1  Question: Rotate a triangle A(0,0); B(1,1), C(5,2) about origin by 45degrees. Given: angle of rotation=45 degrees.
  • 12. ROTATION 12  About a pivot point:  Pivot point is the point of rotation  Pivot point need not necessarily be on the object (xp , yp) (x,y) (x’,y’) Pivot Point
  • 13. 13 (xp , yp) (x,y) (x1, y1) STEP-1: Translate the pivot point to the origin ROTATION
  • 14. 14 (x1, y1) STEP-2: Rotate about the origin (x2, y2) ROTATION
  • 15. 15 STEP-3: Translate the pivot point to original position (x2, y2) (xp, yp) (x’, y’) ROTATION
  • 16. ROTATION 16  About pivot point matrix representation: 1 0 0 1 0 cos θ 1 0 0 0 1 0 0 1 - sin θ 0 1 0 -tx -ty 1 0 0 1 tx ty 1 • (tx,ty)=translation factor • Θ=angle of rotation.
  • 17. Question 17 Q. Rotate a triangle with co-ordinates A(0,0); B(1,1);C(5,2) about a pivot point (1,1) by 45degrees. Given: pivot point=(0,0) angle of rotation=45 degrees. Step1: translate the triangle to origin.(tx=-1,ty=-1) Step 2: rotate the triangle by 45degrees. Step 3: translate the triangle back to the pivot point. (tx=1, ty=1)