尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
2D Geometric
Transformations
Topic – I : Basic Transformation
Basic Transformation
• We can reposition and resize two-dimensional
objects by applying :
– Translation
– Rotation
– Scaling
Translation
• A translation is applied to an object by
repositioning it along a straight-line path from
one coordinate location to another.
• To translate a two-dimensional point by adding
translation distances, tx and ty, to the original
coordinate position (x, y) to move the point to a
new position (x', y').
x' = x + tx, y' = y + ty
• pair (tx, ty) is translation vector or shift vector.
X
Y
P
P'
T
Translation (cont.)
• We can express the translation
equations as a single matrix
equation by using column vectors
to represent coordinate positions
and the translation vector :
• Also: P' = P + T



















y
x
t
t
y'
x'
',
y
x
TPP
Rotation
• A two-dimension rotation is applied to
an object by repositioning it along a
circular path in the xy plane.
• To generate a rotation, we specify a
rotation angle θ and the position (xr, yr)
of the rotation point (or pivot point)
about which the object is to be rotated.
• Positive values for the rotation angle
define counterclockwise rotations about
the pivot point.
• Negative values rotate objects in the
clock direction.
Rotation (cont.)
• The original coordinates of the point in polar
coordinates are :
x = r cos φ, y = r sin φ
• We can express the transformed coordinates in terms
of angles θ and φ as:
x' = r cos (φ + θ) = r cos φ cos θ - r sin φ sin θ
y' = r cos (φ + θ) = r cos φ sin θ + r sin φ cos θ
• Then
x' = x cos θ - y sin θ; y' = x sin θ + y cos θ
(OR)
P' = R * P, where 




 

θθ
θθ
cossin
sincos
R
Scaling
• A scaling transformation alters the size of an
objects.
• This operation can be carried out for polygons
by multiplying the coordinate values (x, y) of
each vertex by scaling factors sx and sy to
produce the transformed coordinates (x', y'):
x' = x * sx, y' = y * sy
• Scaling factor sx scales objects in the x direction,
and sy in the y direction.
Scaling (cont.)
• Any positive numeric values can
assigned to the scaling factor sx and sy.
• Values <1, reduce the size of object.
• Values >1, enlarge the size of object.
• Both values =1, unchanged size.
• When sx and sy are assigned the same
value, it is uniform scaling.
• Unequal values for sx and sy is,
differential scaling.
2D Geometric
Transformations
Topic – II :
Matrix Representation &
Homogeneous Coordinates
Matrix Representation &
Homogeneous Coordinates
• The basic transformations can be expressed in the
general matrix form:
– With coordinate positions P and P' represented as column
vector.
– M1 is a 2x2 array matrix containing multiplicative factor,
– M2 is two-element column matrix containing translational
terms.
– For translation, M1 is the identity matrix.
– For rotation or scaling, M2 contains the translational terms
associated with the pivot point or scaling fixed point.
21' MPMP 
Cont.
• It produce a sequence of transformations with
equation, such as scaling followed by rotation then
translation.
• A more efficient approach would be to combine the
transformations so that the final coordinate position are
obtained directly from the initial coordinates. It
eliminates intermediate coordinates.
• We can combine the multiplicate and translational
terms for 2D geometric transformations into a single
matrix representation by expanding 2x2 matrix to 3x3.
Cont.
• To express any 2D transformation as a matrix
multiplication, we represent each Cartesian coordinate
position (x, y) with the homogeneous coordinate triple
(xh, yh, h).
• Can also be written as (h.x, h.y, h).
– h to be any nonzero value.
– There is infinite number of equivalent homogeneous
representations for each coordinate point (x, y).
– A convenient choice is simply to set h=1. then,
homogeneous coordinates (x, y, 1).
h
y
y,
h
x
x
hh

Cont.
• Expressing positions in homogeneous
coordinates allow us to represent all geometric
transformation equations as matrix
multiplications.
• Coordinates are represented with three-element
column vector, and transformation operations
are written as 3x3 matrices.
For Translation
• The inverse of the translation matrix is obtained
by replacing the translation parameters tx and ty
with –tx and –ty.
PttTP
OR
y
x
t
t
y
x
yx
y
x

































),('
)(
1100
10
01
1
1
1

For Rotation
• The inverse of the rotation matrix θ is replaced
by – θ.
PRP
OR
y
x
y
x





















 











)('
)(
1100
0cossin
0sincos
1
1
1




For Scaling
• The inverse scaling matrix is replacing sx and sy by
1/sx and 1/sy.
PssSP
OR
y
x
s
s
y
x
yx
y
x

































),('
)(
1100
00
00
1
1
1

Computer graphics basic transformation

More Related Content

What's hot

Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
Kamal Acharya
 
Video display devices
Video display devicesVideo display devices
Video display devices
shalinikarunakaran1
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversion
Mohd Arif
 
Attributes of Output Primitives
Attributes of Output PrimitivesAttributes of Output Primitives
Attributes of Output Primitives
Renita Santhmayora
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
KALESHWAR KUMAR
 
Character attributes
Character attributesCharacter attributes
Character attributes
shalinikarunakaran1
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
Mohd Arif
 
Matrix representation- CG.pptx
Matrix representation- CG.pptxMatrix representation- CG.pptx
Matrix representation- CG.pptx
RubaNagarajan
 
Polygon filling
Polygon fillingPolygon filling
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
Maruf Abdullah (Rion)
 
BRESENHAM’S LINE DRAWING ALGORITHM
BRESENHAM’S  LINE DRAWING ALGORITHMBRESENHAM’S  LINE DRAWING ALGORITHM
BRESENHAM’S LINE DRAWING ALGORITHM
St Mary's College,Thrissur,Kerala
 
Video display devices
Video display devicesVideo display devices
Video display devices
Mohd Arif
 
Character generation techniques
Character generation techniquesCharacter generation techniques
Character generation techniques
Mani Kanth
 
Role-of-lexical-analysis
Role-of-lexical-analysisRole-of-lexical-analysis
Role-of-lexical-analysis
Dattatray Gandhmal
 
Overview of the graphics system
Overview of the graphics systemOverview of the graphics system
Overview of the graphics system
Kamal Acharya
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithm
nehrurevathy
 
Input of graphical data
Input of graphical dataInput of graphical data
Input of graphical data
Rajapriya82
 
Composite transformations
Composite transformationsComposite transformations
Composite transformations
Mohd Arif
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
Timbal Mayank
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
Kumar
 

What's hot (20)

Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
Intro to scan conversion
Intro to scan conversionIntro to scan conversion
Intro to scan conversion
 
Attributes of Output Primitives
Attributes of Output PrimitivesAttributes of Output Primitives
Attributes of Output Primitives
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
 
Character attributes
Character attributesCharacter attributes
Character attributes
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Matrix representation- CG.pptx
Matrix representation- CG.pptxMatrix representation- CG.pptx
Matrix representation- CG.pptx
 
Polygon filling
Polygon fillingPolygon filling
Polygon filling
 
Cohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping AlgorithmCohen-Sutherland Line Clipping Algorithm
Cohen-Sutherland Line Clipping Algorithm
 
BRESENHAM’S LINE DRAWING ALGORITHM
BRESENHAM’S  LINE DRAWING ALGORITHMBRESENHAM’S  LINE DRAWING ALGORITHM
BRESENHAM’S LINE DRAWING ALGORITHM
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
Character generation techniques
Character generation techniquesCharacter generation techniques
Character generation techniques
 
Role-of-lexical-analysis
Role-of-lexical-analysisRole-of-lexical-analysis
Role-of-lexical-analysis
 
Overview of the graphics system
Overview of the graphics systemOverview of the graphics system
Overview of the graphics system
 
Bresenham's line drawing algorithm
Bresenham's line drawing algorithmBresenham's line drawing algorithm
Bresenham's line drawing algorithm
 
Input of graphical data
Input of graphical dataInput of graphical data
Input of graphical data
 
Composite transformations
Composite transformationsComposite transformations
Composite transformations
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Fill area algorithms
Fill area algorithmsFill area algorithms
Fill area algorithms
 

Viewers also liked

Two dimensional geometric transformations
Two dimensional geometric transformationsTwo dimensional geometric transformations
Two dimensional geometric transformations
Mohammad Sadiq
 
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
 
Geometric transformation 2d chapter 5
Geometric transformation 2d   chapter 5Geometric transformation 2d   chapter 5
Geometric transformation 2d chapter 5
geethawilliam
 
Hearn and Baker 2 D transformations
Hearn and Baker 2 D transformations   Hearn and Baker 2 D transformations
Hearn and Baker 2 D transformations
Taher Barodawala
 
Notes 2D-Transformation Unit 2 Computer graphics
Notes 2D-Transformation Unit 2 Computer graphicsNotes 2D-Transformation Unit 2 Computer graphics
Notes 2D-Transformation Unit 2 Computer graphics
NANDINI SHARMA
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
Mohd Arif
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
SHIVANI SONI
 
Transforms UNIt 2
Transforms UNIt 2 Transforms UNIt 2
Transforms UNIt 2
sandeep kumbhkar
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
Patel Punit
 
04transformation2d
04transformation2d04transformation2d
04transformation2d
Ketan Jani
 
Two dimensional geometric transformation
Two dimensional geometric transformationTwo dimensional geometric transformation
Two dimensional geometric transformation
japan vasani
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformations
Nareek
 
transformation 3d
transformation 3dtransformation 3d
transformation 3d
HiteshJain007
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
Mohammed Mahmoud
 
Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)
Rajesh Kamboj
 
computer Graphics
computer Graphics computer Graphics
computer Graphics
Rozi khan
 
Spatial Transformation
Spatial TransformationSpatial Transformation
Spatial Transformation
Ehsan Hamzei
 
Planning
PlanningPlanning
Planning
Harriet Hearn
 
Transformations(scaling rotation translation)
Transformations(scaling rotation translation)Transformations(scaling rotation translation)
Transformations(scaling rotation translation)
Arjun Betageri
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cg
harinipriya1994
 

Viewers also liked (20)

Two dimensional geometric transformations
Two dimensional geometric transformationsTwo dimensional geometric transformations
Two dimensional geometric transformations
 
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)
 
Geometric transformation 2d chapter 5
Geometric transformation 2d   chapter 5Geometric transformation 2d   chapter 5
Geometric transformation 2d chapter 5
 
Hearn and Baker 2 D transformations
Hearn and Baker 2 D transformations   Hearn and Baker 2 D transformations
Hearn and Baker 2 D transformations
 
Notes 2D-Transformation Unit 2 Computer graphics
Notes 2D-Transformation Unit 2 Computer graphicsNotes 2D-Transformation Unit 2 Computer graphics
Notes 2D-Transformation Unit 2 Computer graphics
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Transforms UNIt 2
Transforms UNIt 2 Transforms UNIt 2
Transforms UNIt 2
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
04transformation2d
04transformation2d04transformation2d
04transformation2d
 
Two dimensional geometric transformation
Two dimensional geometric transformationTwo dimensional geometric transformation
Two dimensional geometric transformation
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformations
 
transformation 3d
transformation 3dtransformation 3d
transformation 3d
 
Curves and surfaces
Curves and surfacesCurves and surfaces
Curves and surfaces
 
Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)Computer Graphics Notes (B.Tech, KUK, MDU)
Computer Graphics Notes (B.Tech, KUK, MDU)
 
computer Graphics
computer Graphics computer Graphics
computer Graphics
 
Spatial Transformation
Spatial TransformationSpatial Transformation
Spatial Transformation
 
Planning
PlanningPlanning
Planning
 
Transformations(scaling rotation translation)
Transformations(scaling rotation translation)Transformations(scaling rotation translation)
Transformations(scaling rotation translation)
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cg
 

Similar to Computer graphics basic transformation

Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
Balamurugan M
 
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
RADHIKAB20
 
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
Harikumar Rajasekar
 
06.Transformation.ppt
06.Transformation.ppt06.Transformation.ppt
06.Transformation.ppt
RobinAhmedSaikat
 
2Dand3D transformationppt.pptx
2Dand3D transformationppt.pptx2Dand3D transformationppt.pptx
2Dand3D transformationppt.pptx
RAMESHCHANDRANE
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
Amol Gaikwad
 
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
kdemersal
 
GeometricTransformations.ppt
GeometricTransformations.pptGeometricTransformations.ppt
GeometricTransformations.ppt
Debjit Doira
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
Nareek
 
2D-transformation-1.pdf
2D-transformation-1.pdf2D-transformation-1.pdf
2D-transformation-1.pdf
bcanawakadalcollege
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
ShahDhruv21
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
Asma Tehseen
 
Computer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2DComputer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2D
2013901097
 
Computer Graphics - transformations in 2d
Computer Graphics - transformations in 2dComputer Graphics - transformations in 2d
Computer Graphics - transformations in 2d
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
2d transformation
2d transformation2d transformation
2d transformation
Sarkunavathi Aribal
 
2D Transformation in Computer Graphics
2D Transformation in Computer Graphics2D Transformation in Computer Graphics
2D Transformation in Computer Graphics
A. S. M. Shafi
 
2D- Transformation
2D- Transformation2D- Transformation
2D- Transformation
nehrurevathy
 
Part 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptxPart 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptx
Khalil Alhatab
 
2 d transformation
2 d transformation2 d transformation
2 d transformation
Ankit Garg
 
transformations.pdf
transformations.pdftransformations.pdf
transformations.pdf
shubhampatel67739
 

Similar to Computer graphics basic transformation (20)

Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
 
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
 
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
2hjsakhvchcvj hSKchvsABJChjSVCHjhvcvdxz.pptx
 
06.Transformation.ppt
06.Transformation.ppt06.Transformation.ppt
06.Transformation.ppt
 
2Dand3D transformationppt.pptx
2Dand3D transformationppt.pptx2Dand3D transformationppt.pptx
2Dand3D transformationppt.pptx
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
 
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
 
GeometricTransformations.ppt
GeometricTransformations.pptGeometricTransformations.ppt
GeometricTransformations.ppt
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
2D-transformation-1.pdf
2D-transformation-1.pdf2D-transformation-1.pdf
2D-transformation-1.pdf
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
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 transformation
2d transformation2d transformation
2d transformation
 
2D Transformation in Computer Graphics
2D Transformation in Computer Graphics2D Transformation in Computer Graphics
2D Transformation in Computer Graphics
 
2D- Transformation
2D- Transformation2D- Transformation
2D- Transformation
 
Part 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptxPart 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptx
 
2 d transformation
2 d transformation2 d transformation
2 d transformation
 
transformations.pdf
transformations.pdftransformations.pdf
transformations.pdf
 

Recently uploaded

Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc
 
intra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_Enintra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_En
NTTDATA INTRAMART
 
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
anilsa9823
 
Multivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back againMultivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back again
Kieran Kunhya
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Automation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI AutomationAutomation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI Automation
UiPathCommunity
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
ScyllaDB
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
ScyllaDB
 
Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2
DianaGray10
 
An All-Around Benchmark of the DBaaS Market
An All-Around Benchmark of the DBaaS MarketAn All-Around Benchmark of the DBaaS Market
An All-Around Benchmark of the DBaaS Market
ScyllaDB
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
Chapter 5 - Managing Test Activities V4.0
Chapter 5 - Managing Test Activities V4.0Chapter 5 - Managing Test Activities V4.0
Chapter 5 - Managing Test Activities V4.0
Neeraj Kumar Singh
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
Cynthia Thomas
 
New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024
ThousandEyes
 
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State StoreElasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
ScyllaDB
 
CTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database MigrationCTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database Migration
ScyllaDB
 

Recently uploaded (20)

Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
 
intra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_Enintra-mart Accel series 2024 Spring updates_En
intra-mart Accel series 2024 Spring updates_En
 
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
Call Girls Chennai ☎️ +91-7426014248 😍 Chennai Call Girl Beauty Girls Chennai...
 
Multivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back againMultivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back again
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Automation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI AutomationAutomation Student Developers Session 3: Introduction to UI Automation
Automation Student Developers Session 3: Introduction to UI Automation
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
 
Real-Time Persisted Events at Supercell
Real-Time Persisted Events at  SupercellReal-Time Persisted Events at  Supercell
Real-Time Persisted Events at Supercell
 
Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2Communications Mining Series - Zero to Hero - Session 2
Communications Mining Series - Zero to Hero - Session 2
 
An All-Around Benchmark of the DBaaS Market
An All-Around Benchmark of the DBaaS MarketAn All-Around Benchmark of the DBaaS Market
An All-Around Benchmark of the DBaaS Market
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
Chapter 5 - Managing Test Activities V4.0
Chapter 5 - Managing Test Activities V4.0Chapter 5 - Managing Test Activities V4.0
Chapter 5 - Managing Test Activities V4.0
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
 
New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024New ThousandEyes Product Features and Release Highlights: June 2024
New ThousandEyes Product Features and Release Highlights: June 2024
 
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State StoreElasticity vs. State? Exploring Kafka Streams Cassandra State Store
Elasticity vs. State? Exploring Kafka Streams Cassandra State Store
 
CTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database MigrationCTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database Migration
 

Computer graphics basic transformation

  • 1. 2D Geometric Transformations Topic – I : Basic Transformation
  • 2. Basic Transformation • We can reposition and resize two-dimensional objects by applying : – Translation – Rotation – Scaling
  • 3. Translation • A translation is applied to an object by repositioning it along a straight-line path from one coordinate location to another. • To translate a two-dimensional point by adding translation distances, tx and ty, to the original coordinate position (x, y) to move the point to a new position (x', y'). x' = x + tx, y' = y + ty • pair (tx, ty) is translation vector or shift vector.
  • 4. X Y P P' T Translation (cont.) • We can express the translation equations as a single matrix equation by using column vectors to represent coordinate positions and the translation vector : • Also: P' = P + T                    y x t t y' x' ', y x TPP
  • 5. Rotation • A two-dimension rotation is applied to an object by repositioning it along a circular path in the xy plane. • To generate a rotation, we specify a rotation angle θ and the position (xr, yr) of the rotation point (or pivot point) about which the object is to be rotated. • Positive values for the rotation angle define counterclockwise rotations about the pivot point. • Negative values rotate objects in the clock direction.
  • 6. Rotation (cont.) • The original coordinates of the point in polar coordinates are : x = r cos φ, y = r sin φ • We can express the transformed coordinates in terms of angles θ and φ as: x' = r cos (φ + θ) = r cos φ cos θ - r sin φ sin θ y' = r cos (φ + θ) = r cos φ sin θ + r sin φ cos θ • Then x' = x cos θ - y sin θ; y' = x sin θ + y cos θ (OR) P' = R * P, where         θθ θθ cossin sincos R
  • 7. Scaling • A scaling transformation alters the size of an objects. • This operation can be carried out for polygons by multiplying the coordinate values (x, y) of each vertex by scaling factors sx and sy to produce the transformed coordinates (x', y'): x' = x * sx, y' = y * sy • Scaling factor sx scales objects in the x direction, and sy in the y direction.
  • 8. Scaling (cont.) • Any positive numeric values can assigned to the scaling factor sx and sy. • Values <1, reduce the size of object. • Values >1, enlarge the size of object. • Both values =1, unchanged size. • When sx and sy are assigned the same value, it is uniform scaling. • Unequal values for sx and sy is, differential scaling.
  • 9. 2D Geometric Transformations Topic – II : Matrix Representation & Homogeneous Coordinates
  • 10. Matrix Representation & Homogeneous Coordinates • The basic transformations can be expressed in the general matrix form: – With coordinate positions P and P' represented as column vector. – M1 is a 2x2 array matrix containing multiplicative factor, – M2 is two-element column matrix containing translational terms. – For translation, M1 is the identity matrix. – For rotation or scaling, M2 contains the translational terms associated with the pivot point or scaling fixed point. 21' MPMP 
  • 11. Cont. • It produce a sequence of transformations with equation, such as scaling followed by rotation then translation. • A more efficient approach would be to combine the transformations so that the final coordinate position are obtained directly from the initial coordinates. It eliminates intermediate coordinates. • We can combine the multiplicate and translational terms for 2D geometric transformations into a single matrix representation by expanding 2x2 matrix to 3x3.
  • 12. Cont. • To express any 2D transformation as a matrix multiplication, we represent each Cartesian coordinate position (x, y) with the homogeneous coordinate triple (xh, yh, h). • Can also be written as (h.x, h.y, h). – h to be any nonzero value. – There is infinite number of equivalent homogeneous representations for each coordinate point (x, y). – A convenient choice is simply to set h=1. then, homogeneous coordinates (x, y, 1). h y y, h x x hh 
  • 13. Cont. • Expressing positions in homogeneous coordinates allow us to represent all geometric transformation equations as matrix multiplications. • Coordinates are represented with three-element column vector, and transformation operations are written as 3x3 matrices.
  • 14. For Translation • The inverse of the translation matrix is obtained by replacing the translation parameters tx and ty with –tx and –ty. PttTP OR y x t t y x yx y x                                  ),(' )( 1100 10 01 1 1 1 
  • 15. For Rotation • The inverse of the rotation matrix θ is replaced by – θ. PRP OR y x y x                                   )(' )( 1100 0cossin 0sincos 1 1 1    
  • 16. For Scaling • The inverse scaling matrix is replacing sx and sy by 1/sx and 1/sy. PssSP OR y x s s y x yx y x                                  ),(' )( 1100 00 00 1 1 1 
  翻译: