SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Transformations
1
Objectives
• Introduce standard transformations
• Rotation
• Translation
• Scaling
• Shear
• Derive homogeneous coordinate transformation matrices
• Learn to build arbitrary transformation matrices from simple
transformations
2
General Transformations
A transformation maps points to other points and/or vectors to other
vectors
3
Q=T(P)
v=T(u)
Affine Transformations
• Line preserving
• Characteristic of many physically important transformations
• Rigid body transformations: rotation, translation
• Scaling, shear
• Importance in graphics is that we need only transform endpoints of
line segments and let implementation draw line segment between
the transformed endpoints
4
Pipeline Implementation
v
5
transformation rasterizer
u
u
v
T
T(u)
T(v)
T(u)
T(u)
T(v)
T(v)
vertices vertices pixels
frame
buffer
(from application program)
Notation
We will be working with both coordinate-free
representations of transformations and
representations within a particular frame
P,Q, R: points in an affine space
u, v, w: vectors in an affine space
α, β, γ: scalars
p, q, r: representations of points
-array of 4 scalars in homogeneous coordinates
u, v, w: representations of points
-array of 4 scalars in homogeneous coordinates
6
Translation
• Move (translate, displace) a point to a new location
• Displacement determined by a vector d
• Three degrees of freedom
• P’=P+d
7
P
P’
d
How many ways?
Although we can move a point to a new location in
infinite ways, when we move many points there is
usually only one way
8
object translation: every point displaced
by same vector
Translation Using Representations
Using the homogeneous coordinate representation in some frame
p=[ x y z 1]T
p’=[x’ y’ z’ 1]T
d=[dx dy dz 0]T
Hence p’ = p + d or
x’=x+d
x
y’=y+d
y
z’=z+d
z
9
note that this expression is in
four dimensions and expresses
point = vector + point
Translation Matrix
We can also express translation using a
4 x 4 matrix T in homogeneous coordinates
p’=Tp where
T = T(dx, dy, dz) =
This form is better for implementation because all affine
transformations can be expressed this way and multiple
transformations can be concatenated together
10












1000
d100
d010
d001
z
y
x
Rotation (2D)
Consider rotation about the origin by θ degrees
• radius stays the same, angle increases by θ
11
x’=x cos θ –y sin θ
y’ = x sin θ + y cos θ
x = r cos φ
y = r sin φ
x = r cos (φ + θ)
y = r sin (φ + θ)
Rotation about the z axis
•Rotation about z axis in three dimensions leaves all
points with the same z
• Equivalent to rotation in two dimensions in planes of constant z
• or in homogeneous coordinates
p’=R
z(θ)p
12
x’=x cos θ –y sin θ
y’ = x sin θ + y cos θ
z’ =z
Rotation Matrix
R = Rz(θ) =
13












θθ
θ−θ
1000
0100
00cossin
00sincos
Rotation about x and y axes
•Same argument as for rotation about z axis
• For rotation about x axis, x is unchanged
• For rotation about y axis, y is unchanged
14
R = Rx(θ) =
R = Ry(θ) =












θθ
θθ
1000
0cossin0
0sin-cos0
0001












θθ
θθ
1000
0cos0sin-
0010
0sin0cos
Scaling
S = S(sx, sy, sz) =
15












1000
000
000
000
z
y
x
s
s
s
x’=sxx
y’=syx
z’=szx
p’=Sp
Expand or contract along each axis (fixed point of origin)
Reflection
corresponds to negative scale factors
16
originalsx = -1 sy = 1
sx = -1 sy = -1 sx = 1 sy = -1
Inverses
•Although we could compute inverse matrices by
general formulas, we can use simple geometric
observations
• Translation: T-1
(dx, dy, dz) = T(-dx, -dy, -dz)
• Rotation: R
-1
(θ) = R(-θ)
• Holds for any rotation matrix
• Note that since cos(-θ) = cos(θ) and sin(-θ)=-sin(θ)
R -1
(θ) = R T
(θ)
•Scaling: S-1
(sx, sy, sz) = S(1/sx, 1/sy, 1/sz)
17
Concatenation
•We can form arbitrary affine transformation matrices
by multiplying together rotation, translation, and
scaling matrices
•Because the same transformation is applied to many
vertices, the cost of forming a matrix M=ABCD is
not significant compared to the cost of computing
Mp for many vertices p
•The difficult part is how to form a desired
transformation from the specifications in the
application
18
Order of Transformations
• Note that matrix on the right is the first applied
• Mathematically, the following are equivalent
p’ = ABCp = A(B(Cp))
• Note many references use column matrices to represent points. In
terms of column matrices
p’T
= pT
CT
BT
AT
19
General Rotation About the Origin
θ
20
x
z
y
v
A rotation by θ about an arbitrary axis
can be decomposed into the concatenation
of rotations about the x, y, and z axes
R(θ) = Rz(θz) Ry(θy) Rx(θx)
θx θy θz are called the Euler angles
Note that rotations do not commute
We can use rotations in another order but
with different angles
Rotation About a Fixed Point other than
the Origin
Move fixed point to origin
Rotate
Move fixed point back
M = T(pf) R(θ) T(-pf)
21
Instancing
• In modeling, we often start with a simple object centered at the
origin, oriented with the axis, and at a standard size
• We apply an instance transformation to its vertices to
Scale
Orient
Locate
22
Shear
•Helpful to add one more basic transformation
•Equivalent to pulling faces in opposite directions
23
Shear Matrix
Consider simple shear along x axis
24
x’ = x + y cot θ
y’ = y
z’ = z











 θ
1000
0100
0010
00cot1
H(θ) =

Weitere ähnliche Inhalte

Was ist angesagt?

2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinatesTarun Gehlot
 
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
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformationsMohd Arif
 
Geometric transformation
Geometric transformationGeometric transformation
Geometric transformationDhruv Shah
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics University of Potsdam
 
3 d geometric transformations
3 d geometric transformations3 d geometric transformations
3 d geometric transformationsMohd Arif
 
presentation on 2D geometrical transformation
presentation on 2D geometrical transformationpresentation on 2D geometrical transformation
presentation on 2D geometrical transformationRakshit vadi
 
Geometric objects and transformations
Geometric objects and transformationsGeometric objects and transformations
Geometric objects and transformationssaad siddiqui
 
Homogeneous Representation: rotating, shearing
Homogeneous Representation: rotating, shearingHomogeneous Representation: rotating, shearing
Homogeneous Representation: rotating, shearingManthan Kanani
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformationsNareek
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160Ajay Ochani
 
Geometric transformations and projections
Geometric transformations and projectionsGeometric transformations and projections
Geometric transformations and projectionsJaya Teja
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transformPatel Punit
 
Composite transformations
Composite transformationsComposite transformations
Composite transformationsMohd Arif
 
seminar on 2D transformation
seminar on 2D transformationseminar on 2D transformation
seminar on 2D transformation9784
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformationsNareek
 
Modeling Transformations
Modeling TransformationsModeling Transformations
Modeling TransformationsTarun Gehlot
 
Reflection transformation
Reflection transformationReflection transformation
Reflection transformationMani Kanth
 

Was ist angesagt? (20)

2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates
 
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)
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
 
Geometric transformation
Geometric transformationGeometric transformation
Geometric transformation
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
 
3 d geometric transformations
3 d geometric transformations3 d geometric transformations
3 d geometric transformations
 
presentation on 2D geometrical transformation
presentation on 2D geometrical transformationpresentation on 2D geometrical transformation
presentation on 2D geometrical transformation
 
Geometric objects and transformations
Geometric objects and transformationsGeometric objects and transformations
Geometric objects and transformations
 
3 D Graphics
3 D Graphics3 D Graphics
3 D Graphics
 
Homogeneous Representation: rotating, shearing
Homogeneous Representation: rotating, shearingHomogeneous Representation: rotating, shearing
Homogeneous Representation: rotating, shearing
 
Transforms UNIt 2
Transforms UNIt 2 Transforms UNIt 2
Transforms UNIt 2
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformations
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160
 
Geometric transformations and projections
Geometric transformations and projectionsGeometric transformations and projections
Geometric transformations and projections
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
Composite transformations
Composite transformationsComposite transformations
Composite transformations
 
seminar on 2D transformation
seminar on 2D transformationseminar on 2D transformation
seminar on 2D transformation
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
Modeling Transformations
Modeling TransformationsModeling Transformations
Modeling Transformations
 
Reflection transformation
Reflection transformationReflection transformation
Reflection transformation
 

Ähnlich wie Transformations

GeometricTransformations.ppt
GeometricTransformations.pptGeometricTransformations.ppt
GeometricTransformations.pptDebjit Doira
 
Mesh Shape Editing
Mesh Shape EditingMesh Shape Editing
Mesh Shape Editingssuser24ddad
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfvasusingh34
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfvasusingh34
 
M1 unit v-jntuworld
M1 unit v-jntuworldM1 unit v-jntuworld
M1 unit v-jntuworldmrecedu
 
Computer graphics unit 4th
Computer graphics unit 4thComputer graphics unit 4th
Computer graphics unit 4thTEJVEER SINGH
 
Linear Transformations_part1.pdf
Linear Transformations_part1.pdfLinear Transformations_part1.pdf
Linear Transformations_part1.pdfHirunManujaya
 
2-Vector.pptx
2-Vector.pptx2-Vector.pptx
2-Vector.pptxssfasf
 
UNIT-1EMFT_KEE301 by anuj sharma.pptx
UNIT-1EMFT_KEE301  by anuj sharma.pptxUNIT-1EMFT_KEE301  by anuj sharma.pptx
UNIT-1EMFT_KEE301 by anuj sharma.pptxOPTIMUMGAMING
 
Computer graphics
Computer graphicsComputer graphics
Computer graphicsBala Murali
 
Reflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationReflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationSaumya Tiwari
 
2 d transformation
2 d transformation2 d transformation
2 d transformationAnkit Garg
 
3 d scaling and translation in homogeneous coordinates
3 d scaling and translation in homogeneous coordinates3 d scaling and translation in homogeneous coordinates
3 d scaling and translation in homogeneous coordinatesKRIPA SHNAKAR TIWARI
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphicssabbirantor
 

Ähnlich wie Transformations (20)

GeometricTransformations.ppt
GeometricTransformations.pptGeometricTransformations.ppt
GeometricTransformations.ppt
 
Mesh Shape Editing
Mesh Shape EditingMesh Shape Editing
Mesh Shape Editing
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
 
curve one
curve onecurve one
curve one
 
M1 unit v-jntuworld
M1 unit v-jntuworldM1 unit v-jntuworld
M1 unit v-jntuworld
 
Computer graphics unit 4th
Computer graphics unit 4thComputer graphics unit 4th
Computer graphics unit 4th
 
Linear Transformations_part1.pdf
Linear Transformations_part1.pdfLinear Transformations_part1.pdf
Linear Transformations_part1.pdf
 
2-Vector.pptx
2-Vector.pptx2-Vector.pptx
2-Vector.pptx
 
Robot kinematics
Robot kinematicsRobot kinematics
Robot kinematics
 
Z transfrm ppt
Z transfrm pptZ transfrm ppt
Z transfrm ppt
 
Transformations.pptx
Transformations.pptxTransformations.pptx
Transformations.pptx
 
UNIT-1EMFT_KEE301 by anuj sharma.pptx
UNIT-1EMFT_KEE301  by anuj sharma.pptxUNIT-1EMFT_KEE301  by anuj sharma.pptx
UNIT-1EMFT_KEE301 by anuj sharma.pptx
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Reflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationReflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and Rotation
 
Curves in space
Curves in spaceCurves in space
Curves in space
 
2 d transformation
2 d transformation2 d transformation
2 d transformation
 
D4 trigonometrypdf
D4 trigonometrypdfD4 trigonometrypdf
D4 trigonometrypdf
 
3 d scaling and translation in homogeneous coordinates
3 d scaling and translation in homogeneous coordinates3 d scaling and translation in homogeneous coordinates
3 d scaling and translation in homogeneous coordinates
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 

Mehr von Syed Zaid Irshad

Mehr von Syed Zaid Irshad (20)

Operating System.pdf
Operating System.pdfOperating System.pdf
Operating System.pdf
 
DBMS_Lab_Manual_&_Solution
DBMS_Lab_Manual_&_SolutionDBMS_Lab_Manual_&_Solution
DBMS_Lab_Manual_&_Solution
 
Data Structure and Algorithms.pptx
Data Structure and Algorithms.pptxData Structure and Algorithms.pptx
Data Structure and Algorithms.pptx
 
Design and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptxDesign and Analysis of Algorithms.pptx
Design and Analysis of Algorithms.pptx
 
Professional Issues in Computing
Professional Issues in ComputingProfessional Issues in Computing
Professional Issues in Computing
 
Reduce course notes class xi
Reduce course notes class xiReduce course notes class xi
Reduce course notes class xi
 
Reduce course notes class xii
Reduce course notes class xiiReduce course notes class xii
Reduce course notes class xii
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
C Language
C LanguageC Language
C Language
 
Flowchart
FlowchartFlowchart
Flowchart
 
Algorithm Pseudo
Algorithm PseudoAlgorithm Pseudo
Algorithm Pseudo
 
Computer Programming
Computer ProgrammingComputer Programming
Computer Programming
 
ICS 2nd Year Book Introduction
ICS 2nd Year Book IntroductionICS 2nd Year Book Introduction
ICS 2nd Year Book Introduction
 
Security, Copyright and the Law
Security, Copyright and the LawSecurity, Copyright and the Law
Security, Copyright and the Law
 
Computer Architecture
Computer ArchitectureComputer Architecture
Computer Architecture
 
Data Communication
Data CommunicationData Communication
Data Communication
 
Information Networks
Information NetworksInformation Networks
Information Networks
 
Basic Concept of Information Technology
Basic Concept of Information TechnologyBasic Concept of Information Technology
Basic Concept of Information Technology
 
Introduction to ICS 1st Year Book
Introduction to ICS 1st Year BookIntroduction to ICS 1st Year Book
Introduction to ICS 1st Year Book
 
Using the set operators
Using the set operatorsUsing the set operators
Using the set operators
 

Kürzlich hochgeladen

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdfKamal Acharya
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwaitjaanualu31
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdfKamal Acharya
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsvanyagupta248
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesRAJNEESHKUMAR341697
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadhamedmustafa094
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Servicemeghakumariji156
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxSCMS School of Architecture
 

Kürzlich hochgeladen (20)

1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Engineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planesEngineering Drawing focus on projection of planes
Engineering Drawing focus on projection of planes
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 

Transformations

  • 2. Objectives • Introduce standard transformations • Rotation • Translation • Scaling • Shear • Derive homogeneous coordinate transformation matrices • Learn to build arbitrary transformation matrices from simple transformations 2
  • 3. General Transformations A transformation maps points to other points and/or vectors to other vectors 3 Q=T(P) v=T(u)
  • 4. Affine Transformations • Line preserving • Characteristic of many physically important transformations • Rigid body transformations: rotation, translation • Scaling, shear • Importance in graphics is that we need only transform endpoints of line segments and let implementation draw line segment between the transformed endpoints 4
  • 6. Notation We will be working with both coordinate-free representations of transformations and representations within a particular frame P,Q, R: points in an affine space u, v, w: vectors in an affine space α, β, γ: scalars p, q, r: representations of points -array of 4 scalars in homogeneous coordinates u, v, w: representations of points -array of 4 scalars in homogeneous coordinates 6
  • 7. Translation • Move (translate, displace) a point to a new location • Displacement determined by a vector d • Three degrees of freedom • P’=P+d 7 P P’ d
  • 8. How many ways? Although we can move a point to a new location in infinite ways, when we move many points there is usually only one way 8 object translation: every point displaced by same vector
  • 9. Translation Using Representations Using the homogeneous coordinate representation in some frame p=[ x y z 1]T p’=[x’ y’ z’ 1]T d=[dx dy dz 0]T Hence p’ = p + d or x’=x+d x y’=y+d y z’=z+d z 9 note that this expression is in four dimensions and expresses point = vector + point
  • 10. Translation Matrix We can also express translation using a 4 x 4 matrix T in homogeneous coordinates p’=Tp where T = T(dx, dy, dz) = This form is better for implementation because all affine transformations can be expressed this way and multiple transformations can be concatenated together 10             1000 d100 d010 d001 z y x
  • 11. Rotation (2D) Consider rotation about the origin by θ degrees • radius stays the same, angle increases by θ 11 x’=x cos θ –y sin θ y’ = x sin θ + y cos θ x = r cos φ y = r sin φ x = r cos (φ + θ) y = r sin (φ + θ)
  • 12. Rotation about the z axis •Rotation about z axis in three dimensions leaves all points with the same z • Equivalent to rotation in two dimensions in planes of constant z • or in homogeneous coordinates p’=R z(θ)p 12 x’=x cos θ –y sin θ y’ = x sin θ + y cos θ z’ =z
  • 13. Rotation Matrix R = Rz(θ) = 13             θθ θ−θ 1000 0100 00cossin 00sincos
  • 14. Rotation about x and y axes •Same argument as for rotation about z axis • For rotation about x axis, x is unchanged • For rotation about y axis, y is unchanged 14 R = Rx(θ) = R = Ry(θ) =             θθ θθ 1000 0cossin0 0sin-cos0 0001             θθ θθ 1000 0cos0sin- 0010 0sin0cos
  • 15. Scaling S = S(sx, sy, sz) = 15             1000 000 000 000 z y x s s s x’=sxx y’=syx z’=szx p’=Sp Expand or contract along each axis (fixed point of origin)
  • 16. Reflection corresponds to negative scale factors 16 originalsx = -1 sy = 1 sx = -1 sy = -1 sx = 1 sy = -1
  • 17. Inverses •Although we could compute inverse matrices by general formulas, we can use simple geometric observations • Translation: T-1 (dx, dy, dz) = T(-dx, -dy, -dz) • Rotation: R -1 (θ) = R(-θ) • Holds for any rotation matrix • Note that since cos(-θ) = cos(θ) and sin(-θ)=-sin(θ) R -1 (θ) = R T (θ) •Scaling: S-1 (sx, sy, sz) = S(1/sx, 1/sy, 1/sz) 17
  • 18. Concatenation •We can form arbitrary affine transformation matrices by multiplying together rotation, translation, and scaling matrices •Because the same transformation is applied to many vertices, the cost of forming a matrix M=ABCD is not significant compared to the cost of computing Mp for many vertices p •The difficult part is how to form a desired transformation from the specifications in the application 18
  • 19. Order of Transformations • Note that matrix on the right is the first applied • Mathematically, the following are equivalent p’ = ABCp = A(B(Cp)) • Note many references use column matrices to represent points. In terms of column matrices p’T = pT CT BT AT 19
  • 20. General Rotation About the Origin θ 20 x z y v A rotation by θ about an arbitrary axis can be decomposed into the concatenation of rotations about the x, y, and z axes R(θ) = Rz(θz) Ry(θy) Rx(θx) θx θy θz are called the Euler angles Note that rotations do not commute We can use rotations in another order but with different angles
  • 21. Rotation About a Fixed Point other than the Origin Move fixed point to origin Rotate Move fixed point back M = T(pf) R(θ) T(-pf) 21
  • 22. Instancing • In modeling, we often start with a simple object centered at the origin, oriented with the axis, and at a standard size • We apply an instance transformation to its vertices to Scale Orient Locate 22
  • 23. Shear •Helpful to add one more basic transformation •Equivalent to pulling faces in opposite directions 23
  • 24. Shear Matrix Consider simple shear along x axis 24 x’ = x + y cot θ y’ = y z’ = z             θ 1000 0100 0010 00cot1 H(θ) =