SlideShare une entreprise Scribd logo
1  sur  52
Transformation
An operation that changes one configuration into
another
Types of Transformation:
Geometric transformation
 Object itself is transformed relative to a stationary co-
ordinate
Co-ordinate transformation
 Co-ordinate system is transformed relative to an object.
 Object is held stationary
2D Geometric Transformations
A two dimensional transformation is any operation
on a point in space (x, y) that maps that point's
coordinates into a new set of coordinates (x1, y1).
Instead of applying a transformation to every point in
every line that makes up an object, the transformation
is applied only to the vertices of the object and then
new lines are drawn between the resulting endpoints.
2D Geometric Transformations
Translate
Rotate Scale
Shear
2D Translation
One of rigid-body transformation, which move objects without
deformation
Translate an object by Adding offsets to coordinates to generate
new coordinates positions
Set tx, ty be the translation distance, we have
P’=P+T
Translation moves the object without deformation
P
P’
T
xtx'x += yty'y +=






=
y
x
P 





=
y
x
t
t
T





=
'y
'x
'P
Basic 2D Translation
To move a line segment, apply the
transformation equation to each of the two
line endpoints and redraw the line between
new endpoints
To move a polygon, apply the transformation
equation to coordinates of each vertex and
regenerate the polygon using the new set of
vertex coordinates
Example
Translate a polygon with coordinates
A(2,5), B(7,10) and c(10,2) by 3 units in
x direction and 4 units in y direction
2D Rotation
Object is rotated ϴ° about the origin.
ϴ > 0 – rotation is counter clock wise
ϴ < 0 – rotation is clock wise
6
π
θ =
y
x0
1
1
2
2
3 4 5 6 7 8 9 10
3
4
5
6
2-D Rotation
x = r cos (φ)
y = r sin (φ)
x’ = r cos (φ + θ)
y’ = r sin (φ + θ)
Trig Identity…
x’ = r cos(φ) cos(θ) – r sin(φ)
sin(θ)
y’ = r sin(φ) sin(θ) + r cos(φ)
cos(θ)
Substitute…
x’ = x cos(θ) - y sin(θ)
y’ = x sin(θ) + y cos(θ)
θ
(x, y)
(x’, y’)
φ
Basic 2D Geometric Transformations
2D Rotation matrix
P’=R·P






ΘΘ
Θ−Θ
=
cossin
sincos
R
ΦΦ
(x,y)r
r θ
(x’,y’)











 −
=





y
x
y
x
θθ
θθ
cossin
sincos
'
'
Basic 2D Geometric Transformations
2D Rotation
Rotation for a point about any specified
position (xr, yr)
x’=xr+(x - xr) cos θ – (y - yr) sin θ
y’=yr+(x - xr) sin θ + (y - yr) cos θ
Rotations also move objects without
deformation
A line is rotated by applying the rotation
formula to each of the endpoints and redrawing
the line between the new end points
A polygon is rotated by applying the rotation
formula to each of the vertices and redrawing
the polygon using new vertex coordinates
Example
A point (4,3) is rotated
counterclockwise by an angle 45°
find the rotation matrix and
resultant point.
Basic 2D Geometric Transformations
2D Scaling
Scaling is the process of expanding or compressing
the dimension of an object
Simple 2D scaling is performed by multiplying object
positions (x, y) by scaling factors sx and sy
x’ = x · sx
y’ = y · sy






⋅





=





y
x
s
s
y
x
y
x
0
0
'
'
P(x,y)
P’(x’,y’)
xsx• x
sy• y
y
2D Scaling
Any positive value can be
used as scaling factor
 Sf < 1 reduce the size of the
object
 Sf > 1 enlarge the object
 Sf = 1 then the object stays
unchanged
 If sx= sy, we call it uniform
scaling
 If scaling factor <1, then the
object moves closer to the
origin and If scaling factor >1,
then the object moves farther
from the origin
y
x
0
1
1
2
2
3 4 5 6 7 8 9 10
3
4
5
6






1
2






1
3






3
6






3
9
Basic 2D Geometric Transformations
2D Scaling
We can control the location of the scaled object by
choosing a position called the fixed point (xf, yf)
x’ – xf = (x – xf) sx y’ – yf = (y – yf) sy
x’=x · sx+ xf (1 – sx)
y’=y · sy+ yf (1 – sy)
Polygons are scaled by applying the above formula to
each vertex, then regenerating the polygon using the
transformed vertices
Example
Scale the polygon with co-ordinates
A(2,5), B(7,10) and c(10,2) by 2 units in
x direction and 2 units in y direction
Homogeneous Coordinates
Expand each 2D coordinate (x, y) to three element
representation (xh, yh, h) called homogenous
coordinates
h is the homogenous parameter such that
x = xh/h, y = yh/h,
A convenient choice is to choose h = 1
Homogeneous Coordinates for translation
2D Translation Matrix
or, P’ = T(tx,ty)·P










⋅










=










1100
10
01
1
'
'
y
x
t
t
y
x
y
x
Homogeneous Coordinates for
rotation
2D Rotation Matrix
or, P’ = R(θ)·P










⋅










ΘΘ
Θ−Θ
=










1100
0cossin
0sincos
1
'
'
y
x
y
x
Homogeneous Coordinates for scaling
2D Scaling Matrix
or, P’ = S(sx,sy)·P










⋅










=










1100
00
00
1
'
'
y
x
s
s
y
x
y
x
Inverse Transformations
2D Inverse Translation Matrix










−
−
=−
100
10
01
1
y
x
t
t
T
Inverse Transformations
2D Inverse Rotation Matrix










ΘΘ−
ΘΘ
=−
100
0cossin
0sincos
1
R
Inverse Transformations
2D Inverse Scaling Matrix
















=−
100
0
1
0
00
1
1
y
x
s
s
S
2D Composite Transformations
We can setup a sequence of transformations as
a composite transformation matrix by
calculating the product of the individual
transformations
P’=M2·M1·P
P’=M·P
2D Composite Transformations
Composite 2D Translations










+
+
=










⋅










100
10
01
100
10
01
100
10
01
21
21
1
1
2
2
yy
xx
y
x
y
x
tt
tt
t
t
t
t
2D Composite Transformations
Composite 2D Rotations










Θ+ΘΘ+Θ
Θ+Θ−Θ+Θ
=










ΘΘ
Θ−Θ
⋅










ΘΘ
Θ−Θ
100
0)cos()sin(
0)sin()cos(
100
0cossin
0sincos
100
0cossin
0sincos
2121
2121
11
11
22
22
2D Composite Transformations
Composite 2D Scaling










⋅
⋅
=










⋅










100
00
00
100
00
00
100
00
00
21
21
1
1
2
2
yy
xx
y
x
y
x
ss
ss
s
s
s
s










−−
+−−
=










−
−
⋅









 −
⋅










100
sin)cos1(cossin
sin)cos1(sincos
100
10
01
100
0cossin
0sincos
100
10
01
θθθθ
θθθθ
θθ
θθ
rr
rr
r
r
r
r
xy
yx
y
x
y
x
( ) ( ) ( ) ( )θθ ,,,, rrrrrr yxRyxTRyxT =−−⋅⋅
Translate Rotate Translate
(xr,yr
)
(xr,yr
)
(xr,yr
)
(xr,yr
)










−
−
=










−
−
⋅










⋅










100
)1(0
)1(0
100
10
01
100
00
00
100
10
01
yfy
xfx
f
fx
f
f
sys
sxs
y
x
s
s
y
x
y
Translate Scale Translate
(xr,yr
)
(xr,yr
)
(xr,yr
)
(xr,yr
)
( ) ( ) ( ) ( )yxffffyxff ssyxSyxTssSyxT ,,,, ,, =−−⋅⋅
Another Example.
Scale
Translate
Rotate
Translate
Example
I sat in the car, and find the side mirror is 0.4m on
my right and 0.3m in my front
• I started my car and drove 5m forward, turned 30
degrees to right, moved 5m forward again, and
turned 45 degrees to the right, and stopped
• What is the position of the side mirror now,
relative to where I was sitting in the beginning?
Other Two Dimensional Transformations
Reflection
Transformation that produces a mirror
image of an object
Image is generated relative to an axis of
reflection by rotating the object 180°
about the reflection axis
Reflection about the line y=0 (the x axis)










−
100
010
001
Reflection about the line x=0 (the y axis)









−
100
010
001
Reflection about the origin










−
−
100
010
001
Reflection when x = y
Example
Consider the triangle ABC with co-
ordinates x(4,1), y(5,2), z(4,3). Reflect
the triangle about the x axis and then
about the line y = -x
Shear
Transformation that distorts the shape of an
object is called shear transformation.
Two shearing transformation used:
 Shift X co-ordinates values
 Shift Y co-ordinates values
X shear
y
x
(0,1) (1,1)
(1,0)(0,0)
y
x
(2,1) (3,1)
(1,0)(0,0)
shx=2










100
010
01 xsh
yy
yshxx x
=
⋅+=
'
'
Preserve Y coordinates but change the X coordinates values
Y shear
Preserve X coordinates but change the Y coordinates values
x’ = x
y’ = y + Shy . x
y
x
(0,1) (1,1)
(1,0)(0,0)
y
x
(0,1)
(1,2)
(1,1)(0,0)










100
01
001
ysh
Example
Perform x shear and y shear along on
a triangle A(2,1), B(4,3), C(2,3) sh = 2
Shear relative to other axis
X shear with reference to Y axis
x
y
1
1
yref = -1
x
shx = ½, yref = -1
1
1 2 3
yref = -1
( )x refx x sh y y
y y
′ = + −
′ =
1
0 1 0
1 0 0 1 1
x x refx sh sh y x
y y
′ − ×    
 ÷  ÷ ÷′ = ÷  ÷ ÷
 ÷  ÷ ÷
    
Shear relative to other axis
Y shear with reference to X axis
( )y ref
x x
y y sh x x
′ =
′ = + −
1 0 0
1
1 0 0 1 1
x y ref
x x
y sh sh x y
′    
 ÷  ÷ ÷′ = − × ÷  ÷ ÷
 ÷  ÷ ÷
    
x
y
1
1xref = -1
y
x
1
1
2
xref = -1
Example
Apply shearing transformation to square with
A(0,0), B(1,0), C(1,1), D(0,1).
Shear parameter value is 0.5 relative to line
Yref = - 1 and Xref = - 1
321321321 M)MM()MM(MMMM ⋅⋅=⋅⋅=⋅⋅
Associative properties
Transformation is not commutative (CopyCD!)
Order of transformation may affect transformation
position
Matrix Concatenation Properties
Transformations between 2DTransformations between 2D
Coordinate SystemsCoordinate Systems
To translate object descriptions from xy coordinates to x’y’
coordinates, we set up a transformation that superimposes
the x’y’ axes onto the xy axes. This is done in two steps:
1. Translate so that the origin (x0, y0) of the x’y’ system is
moved to the origin (0, 0) of the xy system.
2. Rotate the x’ axis onto the x axis.
x
y
x0
x’
y’
y0
θ
Translation
(x’,y’)=Tv(x,y)
x’= x – tx
y’=y-ty
Rotation about origin
(x’,y’)=Rϴ(x,y)
x’= xcosϴ + ysinϴ
y’= -xsinϴ + ycosϴ
Scaling with origin
(x’, y’)=Ssx, sy(x,y)
x’= (1/sx)x
y’= (1/sy)y
Reflection about X
axis
(x’,y’)= Mx(x,y)
x’= x
y’= -y
Reflection about Y
axis
(x’,y’)= My(x,y)
x’= -x
y’= y
Example
Find the x’y’-coordinates of the xy points (10, 20)
and (35, 20), as shown in the figure below:
x
y
30
x’
y’
10
30º
(10, 20)
(35, 20)
Example
Find the x’y’-coordinates of the rectangle shown
in the figure below:
x
y
10
x’
y’
10
60º
20

Contenu connexe

Tendances

Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingMohd Arif
 
Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer GraphicsLaxman Puri
 
Geometric transformations and projections
Geometric transformations and projectionsGeometric transformations and projections
Geometric transformations and projectionsJaya Teja
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithmMani Kanth
 
3D Transformation
3D Transformation3D Transformation
3D TransformationSwatiHans10
 
3 d transformation
3 d transformation3 d transformation
3 d transformationMani Kanth
 
2D Transformations(Computer Graphics)
2D Transformations(Computer Graphics)2D Transformations(Computer Graphics)
2D Transformations(Computer Graphics)AditiPatni3
 
Geometric transformation
Geometric transformationGeometric transformation
Geometric transformationDhruv Shah
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)Timbal Mayank
 
Two dimensional geometric transformations
Two dimensional geometric transformationsTwo dimensional geometric transformations
Two dimensional geometric transformationsMohammad Sadiq
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output PrimitivesPrathimaBaliga
 
Homogeneous Representation: rotating, shearing
Homogeneous Representation: rotating, shearingHomogeneous Representation: rotating, shearing
Homogeneous Representation: rotating, shearingManthan Kanani
 
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath YogiB. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath YogiTekendra Nath Yogi
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformationsMohd Arif
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphicssabbirantor
 
3 d viewing projection
3 d viewing  projection3 d viewing  projection
3 d viewing projectionPooja Dixit
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphicsKALESHWAR KUMAR
 

Tendances (20)

Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
3D Transformation
3D Transformation 3D Transformation
3D Transformation
 
Clipping in Computer Graphics
Clipping in Computer GraphicsClipping in Computer Graphics
Clipping in Computer Graphics
 
Geometric transformations and projections
Geometric transformations and projectionsGeometric transformations and projections
Geometric transformations and projections
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithm
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
 
3 d transformation
3 d transformation3 d transformation
3 d transformation
 
2D Transformations(Computer Graphics)
2D Transformations(Computer Graphics)2D Transformations(Computer Graphics)
2D Transformations(Computer Graphics)
 
Geometric transformation
Geometric transformationGeometric transformation
Geometric transformation
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Two dimensional geometric transformations
Two dimensional geometric transformationsTwo dimensional geometric transformations
Two dimensional geometric transformations
 
Chapter 3 Output Primitives
Chapter 3 Output PrimitivesChapter 3 Output Primitives
Chapter 3 Output Primitives
 
Bresenham circle
Bresenham circleBresenham circle
Bresenham circle
 
Homogeneous Representation: rotating, shearing
Homogeneous Representation: rotating, shearingHomogeneous Representation: rotating, shearing
Homogeneous Representation: rotating, shearing
 
Computer Graphics
Computer GraphicsComputer Graphics
Computer Graphics
 
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath YogiB. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
B. SC CSIT Computer Graphics Unit 2 By Tekendra Nath Yogi
 
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
 
3 d viewing projection
3 d viewing  projection3 d viewing  projection
3 d viewing projection
 
2 d viewing computer graphics
2 d viewing computer graphics2 d viewing computer graphics
2 d viewing computer graphics
 

En vedette

Two dimensional geometric transformation
Two dimensional geometric transformationTwo dimensional geometric transformation
Two dimensional geometric transformationjapan vasani
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformationSelvakumar Gna
 
3D Geometric Transformations
3D Geometric Transformations3D Geometric Transformations
3D Geometric TransformationsIshan Parekh
 
Geometric transformation 2d chapter 5
Geometric transformation 2d   chapter 5Geometric transformation 2d   chapter 5
Geometric transformation 2d chapter 5geethawilliam
 
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 graphicsNANDINI SHARMA
 
Image capture powerpoint
Image capture powerpointImage capture powerpoint
Image capture powerpointcbottomleyct
 
Lect6 transformation2d
Lect6 transformation2dLect6 transformation2d
Lect6 transformation2dBCET
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160Ajay Ochani
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer GraphicsKamal Acharya
 
2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinatesTarun Gehlot
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer GraphicsSanu Philip
 
Capture a digital image topic 1
Capture a digital image   topic 1Capture a digital image   topic 1
Capture a digital image topic 1obserbmx
 
Factor analysis
Factor analysisFactor analysis
Factor analysisDhruv Goel
 
presentation on 2D geometrical transformation
presentation on 2D geometrical transformationpresentation on 2D geometrical transformation
presentation on 2D geometrical transformationRakshit vadi
 

En vedette (20)

Two dimensional geometric transformation
Two dimensional geometric transformationTwo dimensional geometric transformation
Two dimensional geometric transformation
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
 
transformation 3d
transformation 3dtransformation 3d
transformation 3d
 
3D Geometric Transformations
3D Geometric Transformations3D Geometric Transformations
3D Geometric Transformations
 
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
 
Image capture powerpoint
Image capture powerpointImage capture powerpoint
Image capture powerpoint
 
Lect6 transformation2d
Lect6 transformation2dLect6 transformation2d
Lect6 transformation2d
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160
 
Transforms UNIt 2
Transforms UNIt 2 Transforms UNIt 2
Transforms UNIt 2
 
Introduction to CAD/CAM
Introduction to CAD/CAMIntroduction to CAD/CAM
Introduction to CAD/CAM
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates
 
Projection In Computer Graphics
Projection In Computer GraphicsProjection In Computer Graphics
Projection In Computer Graphics
 
Capture a digital image topic 1
Capture a digital image   topic 1Capture a digital image   topic 1
Capture a digital image topic 1
 
Factor analysis
Factor analysisFactor analysis
Factor analysis
 
presentation on 2D geometrical transformation
presentation on 2D geometrical transformationpresentation on 2D geometrical transformation
presentation on 2D geometrical transformation
 
Introduction cad
Introduction cadIntroduction cad
Introduction cad
 
Planning
PlanningPlanning
Planning
 

Similaire à Two dimentional transform

Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformationsNareek
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformationsAmol Gaikwad
 
09transformation3d
09transformation3d09transformation3d
09transformation3dKetan Jani
 
2D Translation.pdf
2D Translation.pdf2D Translation.pdf
2D Translation.pdfMehulMunshi3
 
2 d transformation
2 d transformation2 d transformation
2 d transformationAnkit Garg
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2aravindangc
 
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
 
Computer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2DComputer Graphic - Transformations in 2D
Computer Graphic - Transformations in 2D2013901097
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformationsNareek
 

Similaire à Two dimentional transform (20)

Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
 
06.Transformation.ppt
06.Transformation.ppt06.Transformation.ppt
06.Transformation.ppt
 
2d transformation
2d transformation2d transformation
2d transformation
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
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
 
transformation IT.ppt
transformation IT.ppttransformation IT.ppt
transformation IT.ppt
 
09transformation3d
09transformation3d09transformation3d
09transformation3d
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
 
2D Translation.pdf
2D Translation.pdf2D Translation.pdf
2D Translation.pdf
 
2 d transformation
2 d transformation2 d transformation
2 d transformation
 
Computer Graphics Unit 2
Computer Graphics Unit 2Computer Graphics Unit 2
Computer Graphics Unit 2
 
2D transformations
2D transformations2D transformations
2D transformations
 
2d transformations
2d transformations2d transformations
2d transformations
 
2D-transformation-1.pdf
2D-transformation-1.pdf2D-transformation-1.pdf
2D-transformation-1.pdf
 
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
 
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
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformations
 
2-D Transformations.pdf
2-D Transformations.pdf2-D Transformations.pdf
2-D Transformations.pdf
 

Dernier

Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Sheetaleventcompany
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...lizamodels9
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLSeo
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityEric T. Tung
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxpriyanshujha201
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptxnandhinijagan9867
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Serviceritikaroy0888
 
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...Anamikakaur10
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with CultureSeta Wicaksana
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfAdmir Softic
 
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceEluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceDamini Dixit
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Dave Litwiller
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876dlhescort
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...rajveerescorts2022
 

Dernier (20)

Falcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investorsFalcon Invoice Discounting: The best investment platform in india for investors
Falcon Invoice Discounting: The best investment platform in india for investors
 
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
Chandigarh Escorts Service 📞8868886958📞 Just📲 Call Nihal Chandigarh Call Girl...
 
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
Call Girls In DLf Gurgaon ➥99902@11544 ( Best price)100% Genuine Escort In 24...
 
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRLMONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
MONA 98765-12871 CALL GIRLS IN LUDHIANA LUDHIANA CALL GIRL
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Falcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in indiaFalcon Invoice Discounting platform in india
Falcon Invoice Discounting platform in india
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptxB.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
B.COM Unit – 4 ( CORPORATE SOCIAL RESPONSIBILITY ( CSR ).pptx
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
Call Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine ServiceCall Girls In Panjim North Goa 9971646499 Genuine Service
Call Girls In Panjim North Goa 9971646499 Genuine Service
 
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
Call Now ☎️🔝 9332606886🔝 Call Girls ❤ Service In Bhilwara Female Escorts Serv...
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdfDr. Admir Softic_ presentation_Green Club_ENG.pdf
Dr. Admir Softic_ presentation_Green Club_ENG.pdf
 
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort ServiceEluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
Eluru Call Girls Service ☎ ️93326-06886 ❤️‍🔥 Enjoy 24/7 Escort Service
 
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
Enhancing and Restoring Safety & Quality Cultures - Dave Litwiller - May 2024...
 
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
(Anamika) VIP Call Girls Napur Call Now 8617697112 Napur Escorts 24x7
 
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
Call Girls in Delhi, Escort Service Available 24x7 in Delhi 959961-/-3876
 
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
👉Chandigarh Call Girls 👉9878799926👉Just Call👉Chandigarh Call Girl In Chandiga...
 

Two dimentional transform

  • 1.
  • 2. Transformation An operation that changes one configuration into another Types of Transformation: Geometric transformation  Object itself is transformed relative to a stationary co- ordinate Co-ordinate transformation  Co-ordinate system is transformed relative to an object.  Object is held stationary
  • 3. 2D Geometric Transformations A two dimensional transformation is any operation on a point in space (x, y) that maps that point's coordinates into a new set of coordinates (x1, y1). Instead of applying a transformation to every point in every line that makes up an object, the transformation is applied only to the vertices of the object and then new lines are drawn between the resulting endpoints.
  • 5. 2D Translation One of rigid-body transformation, which move objects without deformation Translate an object by Adding offsets to coordinates to generate new coordinates positions Set tx, ty be the translation distance, we have P’=P+T Translation moves the object without deformation P P’ T xtx'x += yty'y +=       = y x P       = y x t t T      = 'y 'x 'P
  • 6. Basic 2D Translation To move a line segment, apply the transformation equation to each of the two line endpoints and redraw the line between new endpoints To move a polygon, apply the transformation equation to coordinates of each vertex and regenerate the polygon using the new set of vertex coordinates
  • 7. Example Translate a polygon with coordinates A(2,5), B(7,10) and c(10,2) by 3 units in x direction and 4 units in y direction
  • 8. 2D Rotation Object is rotated ϴ° about the origin. ϴ > 0 – rotation is counter clock wise ϴ < 0 – rotation is clock wise 6 π θ = y x0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6
  • 9. 2-D Rotation x = r cos (φ) y = r sin (φ) x’ = r cos (φ + θ) y’ = r sin (φ + θ) Trig Identity… x’ = r cos(φ) cos(θ) – r sin(φ) sin(θ) y’ = r sin(φ) sin(θ) + r cos(φ) cos(θ) Substitute… x’ = x cos(θ) - y sin(θ) y’ = x sin(θ) + y cos(θ) θ (x, y) (x’, y’) φ
  • 10. Basic 2D Geometric Transformations 2D Rotation matrix P’=R·P       ΘΘ Θ−Θ = cossin sincos R ΦΦ (x,y)r r θ (x’,y’)             − =      y x y x θθ θθ cossin sincos ' '
  • 11. Basic 2D Geometric Transformations 2D Rotation Rotation for a point about any specified position (xr, yr) x’=xr+(x - xr) cos θ – (y - yr) sin θ y’=yr+(x - xr) sin θ + (y - yr) cos θ
  • 12. Rotations also move objects without deformation A line is rotated by applying the rotation formula to each of the endpoints and redrawing the line between the new end points A polygon is rotated by applying the rotation formula to each of the vertices and redrawing the polygon using new vertex coordinates
  • 13. Example A point (4,3) is rotated counterclockwise by an angle 45° find the rotation matrix and resultant point.
  • 14. Basic 2D Geometric Transformations 2D Scaling Scaling is the process of expanding or compressing the dimension of an object Simple 2D scaling is performed by multiplying object positions (x, y) by scaling factors sx and sy x’ = x · sx y’ = y · sy       ⋅      =      y x s s y x y x 0 0 ' ' P(x,y) P’(x’,y’) xsx• x sy• y y
  • 15. 2D Scaling Any positive value can be used as scaling factor  Sf < 1 reduce the size of the object  Sf > 1 enlarge the object  Sf = 1 then the object stays unchanged  If sx= sy, we call it uniform scaling  If scaling factor <1, then the object moves closer to the origin and If scaling factor >1, then the object moves farther from the origin y x 0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6       1 2       1 3       3 6       3 9
  • 16. Basic 2D Geometric Transformations 2D Scaling We can control the location of the scaled object by choosing a position called the fixed point (xf, yf) x’ – xf = (x – xf) sx y’ – yf = (y – yf) sy x’=x · sx+ xf (1 – sx) y’=y · sy+ yf (1 – sy) Polygons are scaled by applying the above formula to each vertex, then regenerating the polygon using the transformed vertices
  • 17. Example Scale the polygon with co-ordinates A(2,5), B(7,10) and c(10,2) by 2 units in x direction and 2 units in y direction
  • 18. Homogeneous Coordinates Expand each 2D coordinate (x, y) to three element representation (xh, yh, h) called homogenous coordinates h is the homogenous parameter such that x = xh/h, y = yh/h, A convenient choice is to choose h = 1
  • 19. Homogeneous Coordinates for translation 2D Translation Matrix or, P’ = T(tx,ty)·P           ⋅           =           1100 10 01 1 ' ' y x t t y x y x
  • 20. Homogeneous Coordinates for rotation 2D Rotation Matrix or, P’ = R(θ)·P           ⋅           ΘΘ Θ−Θ =           1100 0cossin 0sincos 1 ' ' y x y x
  • 21. Homogeneous Coordinates for scaling 2D Scaling Matrix or, P’ = S(sx,sy)·P           ⋅           =           1100 00 00 1 ' ' y x s s y x y x
  • 22. Inverse Transformations 2D Inverse Translation Matrix           − − =− 100 10 01 1 y x t t T
  • 23. Inverse Transformations 2D Inverse Rotation Matrix           ΘΘ− ΘΘ =− 100 0cossin 0sincos 1 R
  • 24. Inverse Transformations 2D Inverse Scaling Matrix                 =− 100 0 1 0 00 1 1 y x s s S
  • 25. 2D Composite Transformations We can setup a sequence of transformations as a composite transformation matrix by calculating the product of the individual transformations P’=M2·M1·P P’=M·P
  • 26. 2D Composite Transformations Composite 2D Translations           + + =           ⋅           100 10 01 100 10 01 100 10 01 21 21 1 1 2 2 yy xx y x y x tt tt t t t t
  • 27. 2D Composite Transformations Composite 2D Rotations           Θ+ΘΘ+Θ Θ+Θ−Θ+Θ =           ΘΘ Θ−Θ ⋅           ΘΘ Θ−Θ 100 0)cos()sin( 0)sin()cos( 100 0cossin 0sincos 100 0cossin 0sincos 2121 2121 11 11 22 22
  • 28. 2D Composite Transformations Composite 2D Scaling           ⋅ ⋅ =           ⋅           100 00 00 100 00 00 100 00 00 21 21 1 1 2 2 yy xx y x y x ss ss s s s s
  • 29.
  • 31.
  • 34. Example I sat in the car, and find the side mirror is 0.4m on my right and 0.3m in my front • I started my car and drove 5m forward, turned 30 degrees to right, moved 5m forward again, and turned 45 degrees to the right, and stopped • What is the position of the side mirror now, relative to where I was sitting in the beginning?
  • 35. Other Two Dimensional Transformations Reflection Transformation that produces a mirror image of an object Image is generated relative to an axis of reflection by rotating the object 180° about the reflection axis
  • 36. Reflection about the line y=0 (the x axis)           − 100 010 001
  • 37. Reflection about the line x=0 (the y axis)          − 100 010 001
  • 38. Reflection about the origin           − − 100 010 001
  • 40. Example Consider the triangle ABC with co- ordinates x(4,1), y(5,2), z(4,3). Reflect the triangle about the x axis and then about the line y = -x
  • 41. Shear Transformation that distorts the shape of an object is called shear transformation. Two shearing transformation used:  Shift X co-ordinates values  Shift Y co-ordinates values
  • 42. X shear y x (0,1) (1,1) (1,0)(0,0) y x (2,1) (3,1) (1,0)(0,0) shx=2           100 010 01 xsh yy yshxx x = ⋅+= ' ' Preserve Y coordinates but change the X coordinates values
  • 43. Y shear Preserve X coordinates but change the Y coordinates values x’ = x y’ = y + Shy . x y x (0,1) (1,1) (1,0)(0,0) y x (0,1) (1,2) (1,1)(0,0)           100 01 001 ysh
  • 44. Example Perform x shear and y shear along on a triangle A(2,1), B(4,3), C(2,3) sh = 2
  • 45. Shear relative to other axis X shear with reference to Y axis x y 1 1 yref = -1 x shx = ½, yref = -1 1 1 2 3 yref = -1 ( )x refx x sh y y y y ′ = + − ′ = 1 0 1 0 1 0 0 1 1 x x refx sh sh y x y y ′ − ×      ÷  ÷ ÷′ = ÷  ÷ ÷  ÷  ÷ ÷     
  • 46. Shear relative to other axis Y shear with reference to X axis ( )y ref x x y y sh x x ′ = ′ = + − 1 0 0 1 1 0 0 1 1 x y ref x x y sh sh x y ′      ÷  ÷ ÷′ = − × ÷  ÷ ÷  ÷  ÷ ÷      x y 1 1xref = -1 y x 1 1 2 xref = -1
  • 47. Example Apply shearing transformation to square with A(0,0), B(1,0), C(1,1), D(0,1). Shear parameter value is 0.5 relative to line Yref = - 1 and Xref = - 1
  • 48. 321321321 M)MM()MM(MMMM ⋅⋅=⋅⋅=⋅⋅ Associative properties Transformation is not commutative (CopyCD!) Order of transformation may affect transformation position Matrix Concatenation Properties
  • 49. Transformations between 2DTransformations between 2D Coordinate SystemsCoordinate Systems To translate object descriptions from xy coordinates to x’y’ coordinates, we set up a transformation that superimposes the x’y’ axes onto the xy axes. This is done in two steps: 1. Translate so that the origin (x0, y0) of the x’y’ system is moved to the origin (0, 0) of the xy system. 2. Rotate the x’ axis onto the x axis. x y x0 x’ y’ y0 θ
  • 50. Translation (x’,y’)=Tv(x,y) x’= x – tx y’=y-ty Rotation about origin (x’,y’)=Rϴ(x,y) x’= xcosϴ + ysinϴ y’= -xsinϴ + ycosϴ Scaling with origin (x’, y’)=Ssx, sy(x,y) x’= (1/sx)x y’= (1/sy)y Reflection about X axis (x’,y’)= Mx(x,y) x’= x y’= -y Reflection about Y axis (x’,y’)= My(x,y) x’= -x y’= y
  • 51. Example Find the x’y’-coordinates of the xy points (10, 20) and (35, 20), as shown in the figure below: x y 30 x’ y’ 10 30º (10, 20) (35, 20)
  • 52. Example Find the x’y’-coordinates of the rectangle shown in the figure below: x y 10 x’ y’ 10 60º 20