SlideShare a Scribd company logo
1 of 24
Download to read offline
Computer Graphics
3D Transformation
CSE, MRIIRS
CONTENTS
● Transformation
● Types of 3-D Transformation
1) Translation
2) Rotation
3) Scaling
4) Reflection
5) Shearing
TRANSFORMATION
● Transformations are a fundamental part of the
computer graphics. Transformations are the
movement of the object in Cartesian plane .
● TYPES OF TRANSFORMATION
There are two types of transformation
in computer graphics.
○ 2D transformation
○ 3D transformation
● Types of 2D and 3D transformation
1)Translation 2) Rotation 3) Scaling
4) Shearing 5) reflection
3D TRANSFORMATION
● When the transformation takes place on a 3D plane, it
is called 3D transformation
● The translation, scaling and rotation transformations
used for 2D can be extended to three dimensions.
● In 3D, each transformation is represented by a 4x4
matrix.
● Using homogeneous coordinates it is possible to
represent each type of transformation in a matrix
form and integrate transformations into one matrix
● To apply transformations, simply multiply matrices,
also easier in hardware and software implementation
● Homogeneous coordinates can represent directions
● Homogeneous coordinates: 4 components
● Transformation matrices: 4×4 elements
● WHY WE USE TRANSFORMATION
Transformation are used to position objects, to shape
object, to change viewing positions, and even how
something is viewed.
1
⎥
⎢
0
⎥
r
⎥
⎢
⎢
q
⎥
⎢
d
p
⎡
a
3D TRANSLATION
● Moving of object is called translation
● In 3 dimensional homogeneous coordinate
representation , a point is transformed from
position P = ( x, y , z) to P’=( x’, y’, z’)
● This can be written as: Using P’= T . P where
x'= x+tx , y'=y +ty , z'=z + tz;
● where tx,ty and tz are translational factors
⎥
⎥
⎥
⎢
⎥
⎢
1⎥
⎦
⎣
1
⎦
0
⎥
⎢
y
⎥
0⎤
⎡
x
⎤
0 0
1 0
0 1 0
⎥
⎢
z
⎥
ty
tz
⎢
⎢ ⎥
=
⎢
⎢ ⎥
⎢
0
⎢ ⎥
⎣
⎥
'
⎢
z
'
⎥
y
⎡
x
' ⎤
⎡
1
⎢
0
⎣
⎢
t
x
TRANSLATION
original
translation along
y, or V = (0, k, 0)
3-D ROTATIONS
● Rotation needs an angle and an axis.
● Rotation is defined according to the right-hand
rule (our convention)
● In 3D, rotation is about a vector, which can be
done through rotations about x, y or z axes.
● Positive rotations are anti-clockwise, negative
rotations are clockwise, when looking down a
positive axis towards the origin
x
y
z
x
z
x
y y
z
3-D ROTATION TRANSFORMATION MATRIX
Rotations are orthogonal matrices, preserving distances and
angles.
1. Rotation about X-axis
2. Rotation about Y-axis
3. Rotation about Z-axis
⎣ 1
⎥
⎥
0
⎥
⎢
0
⎢
0
0
⎥
0
⎤
⎡
1
⎢
0
0 0
cosθ sinθ
R x
=
⎢
⎦
⎢
⎢
⎣ 1
⎥
0
⎥
0
⎥
0
⎥
⎢
sin
θ
R y
=
⎦
1
⎥
⎥
0
⎥
0
0
0
⎥
⎢
− sinθ cosθ
R z
=
3-D ROTATION TRANSFORMATION
1. Rotation about X-axis
2. Rotation about Y-axis
3. Rotation about Z-axis
⎣ 1
⎥
⎥
0
⎥
⎢
0
⎢
0
0
⎤
⎡
1
⎢
0
0 0
cosθ sinθ
⎦
⎢
⎢
⎣
0
⎥
0
⎥
0
⎥
⎦
1
⎥
⎥
0
⎥
0
0
0
⎥
rotation about the Z axis
Rotation
rotation about the X axis
rotation about the Y axis
3-D SCALING
● You can change the size of an object using scaling
transformation .
● In the scaling process , you either expand or
compress the dimensions of the object .
● Scaling can be achieved by multiplying the original
coordinates of the object with scaling factor to get
the desired result
● The general transformation matrix for scaling is
⎥⎢ ⎥
⎦
⎥⎢ ⎥
0
⎥⎢
z
⎥
0
⎥⎢
y
⎥
0
⎤⎡
x
⎤
⎣
⎢ ⎥
= ⎢
⎢ ⎥
⎢
0
⎢
0
⎢
0
'
⎢
z
'
⎥
y
⎡
x
'
⎤
y
Scaling in x-direction by factor a
Scaling in y-direction by factor e
Scaling in z-direction by factor j
3-D SCALING
1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
⎦
⎣ 1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
⎦
0
⎤
0 0
⎦
⎣ 1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
Scaling in x,y,z-direction by factor a,e,
j-units respectively.
Uniform scaling in x-direction by
factor a, if a>1 then expansion occurs if
0<a<1 contraction occurs
3-D SCALING
⎣ 1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
Original scale all axes scale Y axis offset from origin
Equations for Scaling
3D REFLECTION
● Reflection in computer graphics is used to emulate
reflective objects like mirrors and shiny surfaces
● Reflection may be an x-axis y-axis , z-axis. and
also in the planes xy-plane,yz-plane , and zx-
plane.
● Note: Reflection relative to a given Axis are
equivalent to 180 Degree rotations
Reflection about x axis
x’=x y’=-y z’=-z
Reflection about y axis
y’=y x’=-x z’=-z
3D REFLECTION
1
⎥
⎢
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
⎦
⎣ 1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
Reflection about z axis
x’=-x y’=-y z’= z
3D REFLECTION
1
⎥
⎢
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
⎦
⎣ 1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
Reflection about xy-plane(or z=0plane)
Reflection about yz-plane(or x=0plane)
3D REFLECTION
1
⎥
⎢
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
⎦
⎣ 1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
Reflection about zx-plane(or y=0plane)
3D REFLECTION
⎦
⎣ 1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
⎡
1 0 0 0
⎤
−1 0
0 1
0 0
3D SHEARING
● Shearing is the process of slanting an object in 3D
space either in x, y, or in the z-direction. Shearing
changes(or deformed) the shape of the object.
⎥⎢ ⎥
1
⎦⎣
1
⎦
⎥⎢ ⎥
0
⎥⎢
z
⎥
0
⎥⎢
y
⎥
0
⎤⎡
x
⎤
⎢
⎣ ⎦
⎢
1
⎥
⎢
c
⎡
1 a b
1 d
⎢
e f 1
⎢ ⎥
=
⎢
⎢
z
′⎥
⎢
y′
⎥
⎡
x′
⎤
Shearing in x-direction
Here the coordinate of X remains unchanged while
the coordinate of Y and Z is changed.
x1 = x0
y1 = y0 + SHy. x0
z1 = z0 + SHz. x0
3D SHEARING
Shearing in y-direction
Here the coordinate of Y remains unchanged while
the coordinate of X and Z is changed
Shearing in z-direction
⎣ 1
⎥
⎥
0
⎥
0
⎥
⎢
⎢
e
⎢
c
⎦
⎣ 1
⎥
⎢
0
⎥
0
⎥
⎢
⎢
0
0
⎥
⎢
0
x1 = x0 +SHx. y0
y1 = y0
z1 = z0 + SHz. y0
x1 = x0 +SHx. z0
y1 = y0+SHy. z0
z1 = z0
COMPOSITE TRANSFORMATION
A number of transformations or sequence of transformations can be combined into single
one called as composition.
The resulting matrix is called as composite matrix. The process of combining is called as
concatenation.
Suppose we want to perform rotation about an arbitrary point, then we can perform it by
the sequence of three transformations
1. Translation
2. Rotation
3. Reverse Translation
The ordering sequence of these numbers of transformations must not be changed. If a
matrix is represented in column form, then the composite transformation is performed by
multiplying matrix in order from right to left side. The output obtained from the previous
matrix is multiplied with the new coming matrix.
QUESTIONS
● How to rotate an object about an arbitrary axis
● How to shear along y and z axis
● Given a point P(90,20,40) perform rotation along
x axis by 45 degree,translation by tx=30 and
scaling sy=2 and find the final coordinate after
transformation

More Related Content

What's hot

Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan systemshalinikarunakaran1
 
Scan line method
Scan line methodScan line method
Scan line methodPooja Dixit
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformationSelvakumar Gna
 
2D Transformation in Computer Graphics
2D Transformation in Computer Graphics2D Transformation in Computer Graphics
2D Transformation in Computer GraphicsA. S. M. Shafi
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics University of Potsdam
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphicanku2266
 
Polygon filling algorithm
Polygon filling algorithmPolygon filling algorithm
Polygon filling algorithmAparna Joshi
 
Composite transformations
Composite transformationsComposite transformations
Composite transformationsMohd Arif
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clippingMohd Arif
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in GraphicsRajani Thite
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algoMohd Arif
 
Window to viewport transformation&amp;matrix representation of homogeneous co...
Window to viewport transformation&amp;matrix representation of homogeneous co...Window to viewport transformation&amp;matrix representation of homogeneous co...
Window to viewport transformation&amp;matrix representation of homogeneous co...Mani Kanth
 
Attributes of Output Primitives
Attributes of Output PrimitivesAttributes of Output Primitives
Attributes of Output PrimitivesRenita Santhmayora
 

What's hot (20)

Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan system
 
Scan line method
Scan line methodScan line method
Scan line method
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
 
Frame buffer
Frame bufferFrame buffer
Frame buffer
 
2D Transformation in Computer Graphics
2D Transformation in Computer Graphics2D Transformation in Computer Graphics
2D Transformation in Computer Graphics
 
Raster Scan display
Raster Scan displayRaster Scan display
Raster Scan display
 
3d transformation computer graphics
3d transformation computer graphics 3d transformation computer graphics
3d transformation computer graphics
 
Visible surface detection in computer graphic
Visible surface detection in computer graphicVisible surface detection in computer graphic
Visible surface detection in computer graphic
 
Character attributes
Character attributesCharacter attributes
Character attributes
 
Polygon filling algorithm
Polygon filling algorithmPolygon filling algorithm
Polygon filling algorithm
 
Composite transformations
Composite transformationsComposite transformations
Composite transformations
 
lecture2 computer graphics graphics hardware(Computer graphics tutorials)
 lecture2  computer graphics graphics hardware(Computer graphics tutorials) lecture2  computer graphics graphics hardware(Computer graphics tutorials)
lecture2 computer graphics graphics hardware(Computer graphics tutorials)
 
Polygon clipping
Polygon clippingPolygon clipping
Polygon clipping
 
Clipping
ClippingClipping
Clipping
 
Anti aliasing Computer Graphics
Anti aliasing Computer GraphicsAnti aliasing Computer Graphics
Anti aliasing Computer Graphics
 
Curve clipping
Curve clippingCurve clipping
Curve clipping
 
Segments in Graphics
Segments in GraphicsSegments in Graphics
Segments in Graphics
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algo
 
Window to viewport transformation&amp;matrix representation of homogeneous co...
Window to viewport transformation&amp;matrix representation of homogeneous co...Window to viewport transformation&amp;matrix representation of homogeneous co...
Window to viewport transformation&amp;matrix representation of homogeneous co...
 
Attributes of Output Primitives
Attributes of Output PrimitivesAttributes of Output Primitives
Attributes of Output Primitives
 

Similar to 3D Transformation

3 d transformation
3 d transformation3 d transformation
3 d transformationMani Kanth
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformationsNareek
 
3D transformation and viewing
3D transformation and viewing3D transformation and viewing
3D transformation and viewingYogita Jain
 
3 d transformation
3 d transformation3 d transformation
3 d transformationPooja Dixit
 
2D Translation.pdf
2D Translation.pdf2D Translation.pdf
2D Translation.pdfMehulMunshi3
 
3 d transformations
3 d transformations3 d transformations
3 d transformationsAnkit Garg
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphicsSHIVANI SONI
 
robot kinematics
robot kinematicsrobot kinematics
robot kinematicsSumit Kumar
 
09transformation3d
09transformation3d09transformation3d
09transformation3dKetan Jani
 
3 d transformation
3 d transformation3 d transformation
3 d transformationPooja Dixit
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformationsNareek
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transformPatel Punit
 
3D computer Graphic PPT.pptx in computer graphics
3D computer Graphic PPT.pptx in computer graphics3D computer Graphic PPT.pptx in computer graphics
3D computer Graphic PPT.pptx in computer graphicsgunnugunnu162
 

Similar to 3D Transformation (20)

3D Transformation
3D Transformation3D Transformation
3D Transformation
 
3D Transformation
3D Transformation 3D Transformation
3D Transformation
 
3 d transformation
3 d transformation3 d transformation
3 d transformation
 
Three dimensional transformations
Three dimensional transformationsThree dimensional transformations
Three dimensional transformations
 
3D transformation and viewing
3D transformation and viewing3D transformation and viewing
3D transformation and viewing
 
3 d transformation
3 d transformation3 d transformation
3 d transformation
 
2D Translation.pdf
2D Translation.pdf2D Translation.pdf
2D Translation.pdf
 
Virtual reality
Virtual realityVirtual reality
Virtual reality
 
3 d transformations
3 d transformations3 d transformations
3 d transformations
 
Computer graphics presentation
Computer graphics presentationComputer graphics presentation
Computer graphics presentation
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
robot kinematics
robot kinematicsrobot kinematics
robot kinematics
 
transformation 3d
transformation 3dtransformation 3d
transformation 3d
 
09transformation3d
09transformation3d09transformation3d
09transformation3d
 
3 d transformation
3 d transformation3 d transformation
3 d transformation
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
2D Transformation.pdf
2D Transformation.pdf2D Transformation.pdf
2D Transformation.pdf
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
2D transformations
2D transformations2D transformations
2D transformations
 
3D computer Graphic PPT.pptx in computer graphics
3D computer Graphic PPT.pptx in computer graphics3D computer Graphic PPT.pptx in computer graphics
3D computer Graphic PPT.pptx in computer graphics
 

More from SwatiHans10

Transmission control protocol ...............................
Transmission control protocol ...............................Transmission control protocol ...............................
Transmission control protocol ...............................SwatiHans10
 
analytics platform
analytics platformanalytics platform
analytics platformSwatiHans10
 
data collection.ppt
data collection.pptdata collection.ppt
data collection.pptSwatiHans10
 
heuristic - best search and a*
heuristic - best search and a*heuristic - best search and a*
heuristic - best search and a*SwatiHans10
 
filler structures.pptx
filler structures.pptxfiller structures.pptx
filler structures.pptxSwatiHans10
 
filler structures
filler structuresfiller structures
filler structuresSwatiHans10
 
knowledge representation.pptx
knowledge representation.pptxknowledge representation.pptx
knowledge representation.pptxSwatiHans10
 
Multiplexing.ppt
Multiplexing.pptMultiplexing.ppt
Multiplexing.pptSwatiHans10
 

More from SwatiHans10 (14)

routing algo n
routing algo                                nrouting algo                                n
routing algo n
 
ethernet nn
ethernet                                         nnethernet                                         nn
ethernet nn
 
Transmission control protocol ...............................
Transmission control protocol ...............................Transmission control protocol ...............................
Transmission control protocol ...............................
 
search_sort.ppt
search_sort.pptsearch_sort.ppt
search_sort.ppt
 
analytics platform
analytics platformanalytics platform
analytics platform
 
kpi
kpikpi
kpi
 
data collection.ppt
data collection.pptdata collection.ppt
data collection.ppt
 
heuristic - best search and a*
heuristic - best search and a*heuristic - best search and a*
heuristic - best search and a*
 
filler structures.pptx
filler structures.pptxfiller structures.pptx
filler structures.pptx
 
filler structures
filler structuresfiller structures
filler structures
 
knowledge representation.pptx
knowledge representation.pptxknowledge representation.pptx
knowledge representation.pptx
 
Multiplexing.ppt
Multiplexing.pptMultiplexing.ppt
Multiplexing.ppt
 
ER.ppt
ER.pptER.ppt
ER.ppt
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 

Recently uploaded

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineeringmalavadedarshan25
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 

Recently uploaded (20)

Internship report on mechanical engineering
Internship report on mechanical engineeringInternship report on mechanical engineering
Internship report on mechanical engineering
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 

3D Transformation

  • 2. CONTENTS ● Transformation ● Types of 3-D Transformation 1) Translation 2) Rotation 3) Scaling 4) Reflection 5) Shearing
  • 3. TRANSFORMATION ● Transformations are a fundamental part of the computer graphics. Transformations are the movement of the object in Cartesian plane . ● TYPES OF TRANSFORMATION There are two types of transformation in computer graphics. ○ 2D transformation ○ 3D transformation ● Types of 2D and 3D transformation 1)Translation 2) Rotation 3) Scaling 4) Shearing 5) reflection
  • 4. 3D TRANSFORMATION ● When the transformation takes place on a 3D plane, it is called 3D transformation ● The translation, scaling and rotation transformations used for 2D can be extended to three dimensions. ● In 3D, each transformation is represented by a 4x4 matrix. ● Using homogeneous coordinates it is possible to represent each type of transformation in a matrix form and integrate transformations into one matrix ● To apply transformations, simply multiply matrices, also easier in hardware and software implementation ● Homogeneous coordinates can represent directions
  • 5. ● Homogeneous coordinates: 4 components ● Transformation matrices: 4×4 elements ● WHY WE USE TRANSFORMATION Transformation are used to position objects, to shape object, to change viewing positions, and even how something is viewed. 1 ⎥ ⎢ 0 ⎥ r ⎥ ⎢ ⎢ q ⎥ ⎢ d p ⎡ a
  • 6. 3D TRANSLATION ● Moving of object is called translation ● In 3 dimensional homogeneous coordinate representation , a point is transformed from position P = ( x, y , z) to P’=( x’, y’, z’) ● This can be written as: Using P’= T . P where x'= x+tx , y'=y +ty , z'=z + tz; ● where tx,ty and tz are translational factors ⎥ ⎥ ⎥ ⎢ ⎥ ⎢ 1⎥ ⎦ ⎣ 1 ⎦ 0 ⎥ ⎢ y ⎥ 0⎤ ⎡ x ⎤ 0 0 1 0 0 1 0 ⎥ ⎢ z ⎥ ty tz ⎢ ⎢ ⎥ = ⎢ ⎢ ⎥ ⎢ 0 ⎢ ⎥ ⎣ ⎥ ' ⎢ z ' ⎥ y ⎡ x ' ⎤ ⎡ 1 ⎢ 0 ⎣ ⎢ t x
  • 8. 3-D ROTATIONS ● Rotation needs an angle and an axis. ● Rotation is defined according to the right-hand rule (our convention) ● In 3D, rotation is about a vector, which can be done through rotations about x, y or z axes. ● Positive rotations are anti-clockwise, negative rotations are clockwise, when looking down a positive axis towards the origin x y z x z x y y z
  • 9. 3-D ROTATION TRANSFORMATION MATRIX Rotations are orthogonal matrices, preserving distances and angles. 1. Rotation about X-axis 2. Rotation about Y-axis 3. Rotation about Z-axis ⎣ 1 ⎥ ⎥ 0 ⎥ ⎢ 0 ⎢ 0 0 ⎥ 0 ⎤ ⎡ 1 ⎢ 0 0 0 cosθ sinθ R x = ⎢ ⎦ ⎢ ⎢ ⎣ 1 ⎥ 0 ⎥ 0 ⎥ 0 ⎥ ⎢ sin θ R y = ⎦ 1 ⎥ ⎥ 0 ⎥ 0 0 0 ⎥ ⎢ − sinθ cosθ R z =
  • 10. 3-D ROTATION TRANSFORMATION 1. Rotation about X-axis 2. Rotation about Y-axis 3. Rotation about Z-axis ⎣ 1 ⎥ ⎥ 0 ⎥ ⎢ 0 ⎢ 0 0 ⎤ ⎡ 1 ⎢ 0 0 0 cosθ sinθ ⎦ ⎢ ⎢ ⎣ 0 ⎥ 0 ⎥ 0 ⎥ ⎦ 1 ⎥ ⎥ 0 ⎥ 0 0 0 ⎥
  • 11. rotation about the Z axis Rotation rotation about the X axis rotation about the Y axis
  • 12. 3-D SCALING ● You can change the size of an object using scaling transformation . ● In the scaling process , you either expand or compress the dimensions of the object . ● Scaling can be achieved by multiplying the original coordinates of the object with scaling factor to get the desired result ● The general transformation matrix for scaling is ⎥⎢ ⎥ ⎦ ⎥⎢ ⎥ 0 ⎥⎢ z ⎥ 0 ⎥⎢ y ⎥ 0 ⎤⎡ x ⎤ ⎣ ⎢ ⎥ = ⎢ ⎢ ⎥ ⎢ 0 ⎢ 0 ⎢ 0 ' ⎢ z ' ⎥ y ⎡ x ' ⎤ y
  • 13. Scaling in x-direction by factor a Scaling in y-direction by factor e Scaling in z-direction by factor j 3-D SCALING 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0 ⎦ ⎣ 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0 ⎦ 0 ⎤ 0 0 ⎦ ⎣ 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0
  • 14. Scaling in x,y,z-direction by factor a,e, j-units respectively. Uniform scaling in x-direction by factor a, if a>1 then expansion occurs if 0<a<1 contraction occurs 3-D SCALING ⎣ 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0
  • 15. Original scale all axes scale Y axis offset from origin Equations for Scaling
  • 16. 3D REFLECTION ● Reflection in computer graphics is used to emulate reflective objects like mirrors and shiny surfaces ● Reflection may be an x-axis y-axis , z-axis. and also in the planes xy-plane,yz-plane , and zx- plane. ● Note: Reflection relative to a given Axis are equivalent to 180 Degree rotations
  • 17. Reflection about x axis x’=x y’=-y z’=-z Reflection about y axis y’=y x’=-x z’=-z 3D REFLECTION 1 ⎥ ⎢ ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0 ⎦ ⎣ 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0
  • 18. Reflection about z axis x’=-x y’=-y z’= z 3D REFLECTION 1 ⎥ ⎢ ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0 ⎦ ⎣ 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥
  • 19. Reflection about xy-plane(or z=0plane) Reflection about yz-plane(or x=0plane) 3D REFLECTION 1 ⎥ ⎢ ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0 ⎦ ⎣ 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0
  • 20. Reflection about zx-plane(or y=0plane) 3D REFLECTION ⎦ ⎣ 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0 ⎡ 1 0 0 0 ⎤ −1 0 0 1 0 0
  • 21. 3D SHEARING ● Shearing is the process of slanting an object in 3D space either in x, y, or in the z-direction. Shearing changes(or deformed) the shape of the object. ⎥⎢ ⎥ 1 ⎦⎣ 1 ⎦ ⎥⎢ ⎥ 0 ⎥⎢ z ⎥ 0 ⎥⎢ y ⎥ 0 ⎤⎡ x ⎤ ⎢ ⎣ ⎦ ⎢ 1 ⎥ ⎢ c ⎡ 1 a b 1 d ⎢ e f 1 ⎢ ⎥ = ⎢ ⎢ z ′⎥ ⎢ y′ ⎥ ⎡ x′ ⎤ Shearing in x-direction Here the coordinate of X remains unchanged while the coordinate of Y and Z is changed. x1 = x0 y1 = y0 + SHy. x0 z1 = z0 + SHz. x0
  • 22. 3D SHEARING Shearing in y-direction Here the coordinate of Y remains unchanged while the coordinate of X and Z is changed Shearing in z-direction ⎣ 1 ⎥ ⎥ 0 ⎥ 0 ⎥ ⎢ ⎢ e ⎢ c ⎦ ⎣ 1 ⎥ ⎢ 0 ⎥ 0 ⎥ ⎢ ⎢ 0 0 ⎥ ⎢ 0 x1 = x0 +SHx. y0 y1 = y0 z1 = z0 + SHz. y0 x1 = x0 +SHx. z0 y1 = y0+SHy. z0 z1 = z0
  • 23. COMPOSITE TRANSFORMATION A number of transformations or sequence of transformations can be combined into single one called as composition. The resulting matrix is called as composite matrix. The process of combining is called as concatenation. Suppose we want to perform rotation about an arbitrary point, then we can perform it by the sequence of three transformations 1. Translation 2. Rotation 3. Reverse Translation The ordering sequence of these numbers of transformations must not be changed. If a matrix is represented in column form, then the composite transformation is performed by multiplying matrix in order from right to left side. The output obtained from the previous matrix is multiplied with the new coming matrix.
  • 24. QUESTIONS ● How to rotate an object about an arbitrary axis ● How to shear along y and z axis ● Given a point P(90,20,40) perform rotation along x axis by 45 degree,translation by tx=30 and scaling sy=2 and find the final coordinate after transformation