SlideShare a Scribd company logo
 2 x 1 matrix:
 General Problem: [B] = [T] [A]
[T] represents a generic operator to be applied to the
points in A. T is the geometric transformation matrix.
If A & T are known, the transformed points are obtained
by calculating B.
 Solid body transformations – the above equation is
valid for all set of points and lines of the object being
transformed.
2x3 3x4
 Since A is a 2x3 matrix and B is a 3x4 matrix, the
product AB is a 2x4 matrix
 T= identity matrix:
a=d=1, b=c=0 => x’=x, y’=y.
 Scaling & Reflections:
b=0, c=0 => x' = a.x, y' = d.y; This is scaling by a in x, d in
y.
If, a = d > 1, we have enlargement (scale up) & uniform
scaling.
If, a ≠ d > 1, we have enlargement (scale up) & non
uniform scaling.
If, 0 < a = d < 1, we have compression (scale down) &
uniform scaling.
If, 0 < a ≠ d < 1, we have compression (scale down) & non
uniform scaling.
1 0
0 1
Sx
0
0
 Let Sx= 3, Sy=2:
 What if Sx and/or Sy are negative?
Get reflections through an axis or plane.
 Only diagonal elements are involved in scaling and
reflections. (off diagonal = 0)
 EX: Let Sx= 5, Sy=5:
=
X’=5X, Y’=5Y so its scale up & uniform scale.
 EX: Let Sx= 1/5, Sy=1/5:
=
X’=5/X, Y’=5/Y so its scale down & uniform scale.
5 0
0 5
X’
Y’
X
Y
X’
Y’
1/5 0
0 1/5
X
Y
Reflection about Matrix T
Y = X X’ = Y
Y’ = X
EX: (3,4) => (4,3)
Y = -X X’ = -Y
Y’ = -X
EX: (3,4) => (-4,-3)
Y = 0 Axis (or X Axis) X’ = X
Y’ = -Y
EX: (3,4) => (3,-4)
X = 0 Axis (or Y Axis) X’ = -X
Y’ = Y
EX: (3,4) => (-3,4)
X = 0 and Y = 0 (Y axis & X axis) X’ = -X
Y’ = -Y
EX: (3,4) => (-3,-4)
 Off diagonal terms are involved in Shearing.
 y' depends linearly on x ; This effect is called shear.
 Positive Rotations: counter clockwise about the origin.
 With clockwise.
θ (in degrees) Matrix T
90
180
270 or -90
360 or 0
 Rotate the following shape by θ=270 anticlockwise
 B = A + Td , where Td = [tx ty]T.
 x’= x + tx , y’= y + ty.
 Where else are translations introduced?
1. Rotations - when objects are not centered at the
origin.
2. Scaling - when objects/lines are not centered at the
origin. if line intersects the origin then no
translation.
 Note: we cannot directly represent translations as
matrix multiplication, as we know so far.
 We can represent translations in our general
transformation by using homogeneous coordinates.
 Use a 3 x 3 matrix:
 x' = ax + cy + tx
 y' = bx + cy + ty
 w’ = w
 Each point is now represented by a triplet: (x, y, w).
 (x/w, y/w) are called the Cartesian coordinates of the
homogeneous points.
 EX: Given 4 homogeneous points
 P0=(3,4,2,.5) P1=(24,32,16,4) P2=(9,12,6,1) P3=(18,24,12,3)
 Which of the homogeneous points represent a different 3d
point?
 P0= (3/.5,4/.5,2/.5)= (6,8,4)
 P1=(24/4,32/4,16/4)= (6,8,4)
 P2=(9/1,12/1,6/1)= (9,12,6)
 P3=(18/3,24/3,12/3)= (6,8,4)
 So p2 is different
 General Purpose 2D transformations in homogeneous
coordinate representation:
 Parameters involved in scaling, rotation, reflection
and shear are: a, b, c, d.
 For translation:
If [B]=[T][A] then p,q are
translation Parameter.
if [B]=[A][T] then m,n are
translation parameter.
 There are three steps for translation about an
arbitrary point in space:
1. Translate by (-Tx, -Ty).
2. Scale by Sx, Sy, where Sx = new coordinate for x/ old
Sy = new coordinate for y/ old
3. Translate back by (Tx, Ty)
 EX: Apply translation to the matrix according to the
shape below.
1 0 16
0 1 4
0 0 1
1 0 -2
0 1 -2
0 0 1
8 0 0
0 2 0
0 0 1
X
Y
Z
 There are three steps for scaling about an arbitrary
point in space:
1. Translate by (-Tx, -Ty)
2. Scale by Sx, Sy
3. Translate back by (Tx, Ty)
 EX: Apply Scaling up to the matrix such that Tx= 1,
Ty= 2, Sx= 4, Sy= 12.
=
= =
 x’= x+7w y’=y+16w w’=w
1 0 -1
0 1 -2
0 0 1
X’
Y’
Z’
4 0 0
0 12 0
0 0 1
1 0 4
0 1 12
0 0 1
X
Y
Z
1 0 3
0 1 4
0 0 1
1 0 4
0 1 12
0 0 1
X
Y
Z
1 0 7
0 1 16
0 0 1
X
Y
Z
 EX: Apply Scaling down to the matrix such that Tx= 1,
Ty= 2, Sx= 4, Sy= 12.
=
1 0 -4
0 1 -12
0 0 1
X’
Y’
Z’
1/4 0 0
0 1/6 0
0 0 1
1 0 1
0 1 2
0 0 1
X
Y
Z
 There are three steps for rotation about an arbitrary
point in space:
1. Translate by (-Px, -Py).
2. Rotate.
3. Translate back by (Px, Py)
 EX: Apply rotation to the matrix such that Px= 1, Py= 4
by θ = 90 .
=
1 0 -1
0 1 -4
0 0 1
X’
Y’
Z’
0 -1 0
1 0 0
0 0 1
1 0 1
0 1 4
0 0 1
X
Y
Z
 There are five steps for reflection about an arbitrary
point in space:
1. Translate line to the origin.
2. Rotation about the origin.
3. Reflection matrix.
4. Reverse the rotation.
5. Translate line back.
 If the line pass the origin we need only 3 steps
(remove step 1 and step 5).
 If we want to apply a series of transformations T1, T2,
T3 to a set of points, we can do it in two ways:
1. We can calculate p'=T1*p, p''= T2*p', p'''=T3*p''
2. Calculate T=T1*T2*T3 then p'''=T*p.
 Translations: Translate the points by
tx1, ty1, then by tx2, ty2.
 Scaling: Similar to translations.
 Rotations: Rotate by θ1, then by θ2 and its done by 2
ways:
1. Replace θ1, θ2 by θ=θ1+θ2.
2. calculate T1 for θ1, then T2 for θ2 then multiply
them.
 EX: Apply two scaling to the matrix such that Sx1= 2,
Sy1= 3, Sx2=4, Sy2=2.
 Way #1
 P’= =
 P’’= =
2 0 0
0 3 0
0 0 1
1 0 0
0 2 0
0 0 1
1 0 0
0 2 0
0 0 1
2 0 0
0 6 0
0 0 1
4 0 0
0 2 0
0 0 1
2 0 0
0 6 0
0 0 1
8 0 0
0 12 0
0 0 1
 Way #2
 T = =
 P’’= =
2 0 0
0 3 0
0 0 1
4 0 0
0 2 0
0 0 1
8 0 0
0 6 0
0 0 1
8 0 0
0 6 0
0 0 1
1 0 0
0 2 0
0 0 1
8 0 0
0 12 0
0 0 1
 EX: Find the new coordinate for the point (3,7,1) if you
rotate the point by 180 degree then by 90 degree with
clockwise.
 Composite rotation : 180 + 90 = 270 degree
 Since w=1 the Cartesian coordinate for the point is
(3,7)
1 0 -3
0 1 -7
0 0 1
Cos270 Sin270 0
-Sin270 Cos270 0
0 0 1
1 0 3
0 1 7
0 0 1
 EX: Suppose you have the point (2,4),rotate the point
by 90 degree then by 180 degree the by 45 degree then
by 45 degree then scale it by Sx=2 and Sy=4.
 Composite rotation : 90+180+45+45 = 360 degree
2 0 0
0 4 0
0 0 1
Cos360 Sin360 0
-Sin360 Cos360 0
0 0 1
2
4
1
 EX: Transform the point from left to right.
 Sx1= 4/2= 2, Sy1= 5/2= 2.5, Sx2= 7/4, Sy2= 8/5
 Sx= 2*7/4= 3.5, Sy= 2.5*8/5= 4
1 0 -2
0 1 -2
0 0 1
3.5 0 0
0 4 0
0 0 1
1 0 7
0 1 8
0 0 1
 EX: Transform the point from left to right.
 Sx= 3/1= 3, Sy= 3/1= 3
1 0 -1
0 1 -1
0 0 1
3 0 0
0 3 0
0 0 1
1 0 3
0 1 3
0 0 1
 Cases where T1 * T2 = T2 * T1:
T1 T2
Translation Translation
Scaling Scaling
Rotation Rotation
Uniform Scaling Rotation
 EX: If we scale, translate to origin then translate back
is it equivalent to translate to origin, scale then
translate back? (Sx=2, Sy=3, tx=3, tx=2)
 Answer: No, the order of matrix is important.
=
=
2 0 0
0 3 0
0 0 1
1 0 -3
0 1 -2
0 0 1
1 0 3
0 1 2
0 0 1
2 0 0
0 3 0
0 0 1
2 0 0
0 3 0
0 0 1
1 0 -3
0 1 -2
0 0 1
1 0 3
0 1 2
0 0 1
2 0 3
0 3 4
0 0 1
 EX: If we rotate the object by 90 degree then scale it
,is it equivalent to scale it then rotate it by 90 degree ?
(Sx=2, Sy=3)
=
=
0 -1 0
1 0 0
0 0 1
2 0 0
0 3 0
0 0 1
0 -3 0
2 0 0
0 0 1
0 -1 0
1 0 0
0 0 1
2 0 0
0 3 0
0 0 1
0 -2 0
3 0 0
0 0 1
 EX: If we rotate the object by 90 degree then scale it
,is it equivalent to scale it then rotate it by 90 degree ?
(Sx=4, Sy=4)
=
=
0 -1 0
1 0 0
0 0 1
4 0 0
0 4 0
0 0 1
0 -4 0
4 0 0
0 0 1
0 -1 0
1 0 0
0 0 1
4 0 0
0 4 0
0 0 1
0 -4 0
4 0 0
0 0 1
 EX: Prove that rotation then translation not equal to
translation then rotation?
=
= not equal to the
above
Cosθ -Sinθ
0
Sinθ Cosθ
0
0 0
1
1 0 -
tx
0 1 -
ty
0 0
1
Cosθ –Sinθ -txcosθ+tysinθ
Sinθ Cosθ -txsinθ-tycosθ
0 0 1
1 0 -
tx
0 1 -
ty
0 0
1
Cosθ -Sinθ
0
Sinθ Cosθ
0
0 0
1
 EX: Given a solid object, if we apply uniform scale
then translation to the body, is it the same as we apply
translation then uniform scale?
=
=
Sx 0
0
0 Sy
0
0 0
1
1 0
tx
0 1
ty
0 0
1
Sx Sy Sxtx
0 Sy Syty
0 0 11 0
tx
0 1
ty
0 0
1
Sx 0
0
0 Sy
0
0 0
1
Sx 0 tx
0 Sy ty
0 0 1
 Screen Coordinates: The coordinate system used to
address the screen (device coordinates).
 World Coordinates: A user-defined application specific
coordinate system having its own units of measure,
axis, origin, etc.
 Window: The rectangular region of the world that is
visible.
 Viewport: The rectangular region of the screen space
that is used to display the window.
 The Purpose is to find the transformation matrix that
maps the window in world coordinates to the viewport
in screen coordinates.
 Window: (x, y space) denoted by: xmin, ymin, xmax, ymax.
 Viewport: (u, v space) denoted by: umin, vmin, umax, vmax.
 The overall transformation:
Translate the window to the origin.
Scale it to the size of the viewport.
Translate it to the viewport location.
 EX: Given (xmin=3, ymin=12, xmax=8, ymax=16)
(umin=1, vmin=2, umax=2, vmax=4)
Sx=1/5,Sy=1/2
Map from window to view port.
0 0 -3
0 1 -12
0 0
1
1/5 0 0
0 1/2 0
0 0
1
1 0 1
0 1 2
0 0 1
 Map from window to view port.
 (xmin=20, ymin=10, xmax=40, ymax=50)
 (umin=5, vmin=4, umax=10, vmax=12)
 Sx=(10-5)/(40-20)= 0.25, Sy=(12-4)/(50-10)=0.2
1 0 -20
0 1 -10
0 0
1
.25 0 0
0 .2 0
0 0 1
1 0 5
0 1 4
0 0 1

More Related Content

What's hot

Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 d
xyz120
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
Timbal Mayank
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cg
harinipriya1994
 
2d transformations
2d transformations2d transformations
2d transformations
rajeshranjithsingh
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
ShahDhruv21
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
Asma Tehseen
 
2 d transformation
2 d transformation2 d transformation
2 d transformation
Ankit Garg
 
CG 2D Transformation
CG 2D TransformationCG 2D Transformation
CG 2D Transformation
MohitModyani
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
Bala Murali
 
2 d transformations
2 d transformations2 d transformations
2 d transformations
Sardar Alam
 
Overview of 2D and 3D Transformation
Overview of 2D and 3D TransformationOverview of 2D and 3D Transformation
Overview of 2D and 3D Transformation
Dheeraj Sadawarte
 
Reflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationReflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and Rotation
Saumya Tiwari
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
Patel Punit
 
2D Rotation- Transformation in Computer Graphics
2D Rotation- Transformation in Computer Graphics2D Rotation- Transformation in Computer Graphics
2D Rotation- Transformation in Computer Graphics
Susmita
 
2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates
Tarun Gehlot
 
3 d geometric transformations
3 d geometric transformations3 d geometric transformations
3 d geometric transformations
Mohd Arif
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
Mohd Arif
 
Do you know matrix transformations
Do you know matrix transformationsDo you know matrix transformations
Do you know matrix transformations
Tarun Gehlot
 
Geometric objects and transformations
Geometric objects and transformationsGeometric objects and transformations
Geometric objects and transformations
saad siddiqui
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160
Ajay Ochani
 

What's hot (20)

Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 d
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cg
 
2d transformations
2d transformations2d transformations
2d transformations
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
2 d transformation
2 d transformation2 d transformation
2 d transformation
 
CG 2D Transformation
CG 2D TransformationCG 2D Transformation
CG 2D Transformation
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
2 d transformations
2 d transformations2 d transformations
2 d transformations
 
Overview of 2D and 3D Transformation
Overview of 2D and 3D TransformationOverview of 2D and 3D Transformation
Overview of 2D and 3D Transformation
 
Reflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and RotationReflection, Scaling, Shear, Translation, and Rotation
Reflection, Scaling, Shear, Translation, and Rotation
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
2D Rotation- Transformation in Computer Graphics
2D Rotation- Transformation in Computer Graphics2D Rotation- Transformation in Computer Graphics
2D Rotation- Transformation 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
 
3 d geometric transformations
3 d geometric transformations3 d geometric transformations
3 d geometric transformations
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
 
Do you know matrix transformations
Do you know matrix transformationsDo you know matrix transformations
Do you know matrix transformations
 
Geometric objects and transformations
Geometric objects and transformationsGeometric objects and transformations
Geometric objects and transformations
 
Supot37255412160
Supot37255412160Supot37255412160
Supot37255412160
 

Similar to Computer Graphics - transformations in 2d

2D Transformation in Computer Graphics
2D Transformation in Computer Graphics2D Transformation in Computer Graphics
2D Transformation in Computer Graphics
A. S. M. Shafi
 
transformation IT.ppt
transformation IT.ppttransformation IT.ppt
transformation IT.ppt
ShubhamBatwani
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
A. S. M. Shafi
 
06.Transformation.ppt
06.Transformation.ppt06.Transformation.ppt
06.Transformation.ppt
RobinAhmedSaikat
 
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
 
2D-transformation-1.pdf
2D-transformation-1.pdf2D-transformation-1.pdf
2D-transformation-1.pdf
bcanawakadalcollege
 
2d transformation
2d transformation2d transformation
2d transformation
Sarkunavathi Aribal
 
2-D Transformations.pdf
2-D Transformations.pdf2-D Transformations.pdf
2-D Transformations.pdf
Mattupallipardhu
 
Computer Graphic - Transformations in 3d
Computer Graphic - Transformations in 3dComputer Graphic - Transformations in 3d
Computer Graphic - Transformations in 3d
2013901097
 
Computer Graphics - transformations in 3d
Computer Graphics - transformations in 3dComputer Graphics - transformations in 3d
Computer Graphics - transformations in 3d
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 d
xyz120
 
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
gunnugunnu162
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
A. S. M. Shafi
 
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
KRIPA SHNAKAR TIWARI
 
Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
Balamurugan M
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
Selvakumar Gna
 
moule 3 ppt1 basic 2D transformations.pptx
moule 3 ppt1 basic 2D transformations.pptxmoule 3 ppt1 basic 2D transformations.pptx
moule 3 ppt1 basic 2D transformations.pptx
RADHIKAB20
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
Amol Gaikwad
 
Modeling Transformations
Modeling TransformationsModeling Transformations
Modeling Transformations
Tarun Gehlot
 
D4 trigonometrypdf
D4 trigonometrypdfD4 trigonometrypdf
D4 trigonometrypdf
Krysleng Lynlyn
 

Similar to Computer Graphics - transformations in 2d (20)

2D Transformation in Computer Graphics
2D Transformation in Computer Graphics2D Transformation in Computer Graphics
2D Transformation in Computer Graphics
 
transformation IT.ppt
transformation IT.ppttransformation IT.ppt
transformation IT.ppt
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 
06.Transformation.ppt
06.Transformation.ppt06.Transformation.ppt
06.Transformation.ppt
 
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)
 
2D-transformation-1.pdf
2D-transformation-1.pdf2D-transformation-1.pdf
2D-transformation-1.pdf
 
2d transformation
2d transformation2d transformation
2d transformation
 
2-D Transformations.pdf
2-D Transformations.pdf2-D Transformations.pdf
2-D Transformations.pdf
 
Computer Graphic - Transformations in 3d
Computer Graphic - Transformations in 3dComputer Graphic - Transformations in 3d
Computer Graphic - Transformations in 3d
 
Computer Graphics - transformations in 3d
Computer Graphics - transformations in 3dComputer Graphics - transformations in 3d
Computer Graphics - transformations in 3d
 
Matrix 2 d
Matrix 2 dMatrix 2 d
Matrix 2 d
 
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
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 
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
 
Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
 
moule 3 ppt1 basic 2D transformations.pptx
moule 3 ppt1 basic 2D transformations.pptxmoule 3 ppt1 basic 2D transformations.pptx
moule 3 ppt1 basic 2D transformations.pptx
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
 
Modeling Transformations
Modeling TransformationsModeling Transformations
Modeling Transformations
 
D4 trigonometrypdf
D4 trigonometrypdfD4 trigonometrypdf
D4 trigonometrypdf
 

More from Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D

Audio
AudioAudio
The Passive
The PassiveThe Passive
Relative Clauses
Relative ClausesRelative Clauses
Quantifiers
QuantifiersQuantifiers
Present Simple and Continuous
Present Simple and ContinuousPresent Simple and Continuous
Present Perfect Simple and Continuous
Present Perfect Simple and ContinuousPresent Perfect Simple and Continuous
Present Perfect Simple and Continuous
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Prepositions
PrepositionsPrepositions
Past Simple and Continuous
Past Simple and ContinuousPast Simple and Continuous
Obligation and Permission
Obligation and PermissionObligation and Permission
Comparatives and Superlatives
Comparatives and SuperlativesComparatives and Superlatives
Auxiliary verbs
Auxiliary verbsAuxiliary verbs
Adjective ending in ed or ing
Adjective ending in ed or ingAdjective ending in ed or ing
Operations Research - Game Theory
Operations Research - Game TheoryOperations Research - Game Theory
Operations Research - Game Theory
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Operations Research - Sensitivity Analysis
Operations Research - Sensitivity AnalysisOperations Research - Sensitivity Analysis
Operations Research - Sensitivity Analysis
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Operations Research - The Dual Simplex Method
Operations Research - The Dual Simplex MethodOperations Research - The Dual Simplex Method
Operations Research - The Dual Simplex Method
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Operations Research - The Revised Simplex Method
Operations Research - The Revised Simplex MethodOperations Research - The Revised Simplex Method
Operations Research - The Revised Simplex Method
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Operations Research - The Two Phase Method
Operations Research - The Two Phase MethodOperations Research - The Two Phase Method
Operations Research - The Two Phase Method
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Operations Research - The Big M Method
Operations Research - The Big M MethodOperations Research - The Big M Method
Operations Research - The Big M Method
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Operations Research - Simplex Method Tableau
Operations Research - Simplex Method TableauOperations Research - Simplex Method Tableau
Operations Research - Simplex Method Tableau
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 
Operations Research - Simplex Method Principles
Operations Research - Simplex Method PrinciplesOperations Research - Simplex Method Principles
Operations Research - Simplex Method Principles
Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D
 

More from Hisham Al Kurdi, EAVA, DMC-D-4K, HCCA-P, HCAA-D (20)

Audio
AudioAudio
Audio
 
The Passive
The PassiveThe Passive
The Passive
 
Relative Clauses
Relative ClausesRelative Clauses
Relative Clauses
 
Quantifiers
QuantifiersQuantifiers
Quantifiers
 
Present Simple and Continuous
Present Simple and ContinuousPresent Simple and Continuous
Present Simple and Continuous
 
Present Perfect Simple and Continuous
Present Perfect Simple and ContinuousPresent Perfect Simple and Continuous
Present Perfect Simple and Continuous
 
Prepositions
PrepositionsPrepositions
Prepositions
 
Past Simple and Continuous
Past Simple and ContinuousPast Simple and Continuous
Past Simple and Continuous
 
Obligation and Permission
Obligation and PermissionObligation and Permission
Obligation and Permission
 
Comparatives and Superlatives
Comparatives and SuperlativesComparatives and Superlatives
Comparatives and Superlatives
 
Auxiliary verbs
Auxiliary verbsAuxiliary verbs
Auxiliary verbs
 
Adjective ending in ed or ing
Adjective ending in ed or ingAdjective ending in ed or ing
Adjective ending in ed or ing
 
Operations Research - Game Theory
Operations Research - Game TheoryOperations Research - Game Theory
Operations Research - Game Theory
 
Operations Research - Sensitivity Analysis
Operations Research - Sensitivity AnalysisOperations Research - Sensitivity Analysis
Operations Research - Sensitivity Analysis
 
Operations Research - The Dual Simplex Method
Operations Research - The Dual Simplex MethodOperations Research - The Dual Simplex Method
Operations Research - The Dual Simplex Method
 
Operations Research - The Revised Simplex Method
Operations Research - The Revised Simplex MethodOperations Research - The Revised Simplex Method
Operations Research - The Revised Simplex Method
 
Operations Research - The Two Phase Method
Operations Research - The Two Phase MethodOperations Research - The Two Phase Method
Operations Research - The Two Phase Method
 
Operations Research - The Big M Method
Operations Research - The Big M MethodOperations Research - The Big M Method
Operations Research - The Big M Method
 
Operations Research - Simplex Method Tableau
Operations Research - Simplex Method TableauOperations Research - Simplex Method Tableau
Operations Research - Simplex Method Tableau
 
Operations Research - Simplex Method Principles
Operations Research - Simplex Method PrinciplesOperations Research - Simplex Method Principles
Operations Research - Simplex Method Principles
 

Recently uploaded

How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 

Recently uploaded (20)

How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 

Computer Graphics - transformations in 2d

  • 1.
  • 2.  2 x 1 matrix:  General Problem: [B] = [T] [A] [T] represents a generic operator to be applied to the points in A. T is the geometric transformation matrix. If A & T are known, the transformed points are obtained by calculating B.
  • 3.  Solid body transformations – the above equation is valid for all set of points and lines of the object being transformed.
  • 4. 2x3 3x4  Since A is a 2x3 matrix and B is a 3x4 matrix, the product AB is a 2x4 matrix
  • 5.  T= identity matrix: a=d=1, b=c=0 => x’=x, y’=y.  Scaling & Reflections: b=0, c=0 => x' = a.x, y' = d.y; This is scaling by a in x, d in y. If, a = d > 1, we have enlargement (scale up) & uniform scaling. If, a ≠ d > 1, we have enlargement (scale up) & non uniform scaling. If, 0 < a = d < 1, we have compression (scale down) & uniform scaling. If, 0 < a ≠ d < 1, we have compression (scale down) & non uniform scaling. 1 0 0 1 Sx 0 0
  • 6.  Let Sx= 3, Sy=2:  What if Sx and/or Sy are negative? Get reflections through an axis or plane.  Only diagonal elements are involved in scaling and reflections. (off diagonal = 0)
  • 7.  EX: Let Sx= 5, Sy=5: = X’=5X, Y’=5Y so its scale up & uniform scale.  EX: Let Sx= 1/5, Sy=1/5: = X’=5/X, Y’=5/Y so its scale down & uniform scale. 5 0 0 5 X’ Y’ X Y X’ Y’ 1/5 0 0 1/5 X Y
  • 8. Reflection about Matrix T Y = X X’ = Y Y’ = X EX: (3,4) => (4,3) Y = -X X’ = -Y Y’ = -X EX: (3,4) => (-4,-3) Y = 0 Axis (or X Axis) X’ = X Y’ = -Y EX: (3,4) => (3,-4) X = 0 Axis (or Y Axis) X’ = -X Y’ = Y EX: (3,4) => (-3,4) X = 0 and Y = 0 (Y axis & X axis) X’ = -X Y’ = -Y EX: (3,4) => (-3,-4)
  • 9.  Off diagonal terms are involved in Shearing.  y' depends linearly on x ; This effect is called shear.
  • 10.  Positive Rotations: counter clockwise about the origin.
  • 12. θ (in degrees) Matrix T 90 180 270 or -90 360 or 0
  • 13.  Rotate the following shape by θ=270 anticlockwise
  • 14.  B = A + Td , where Td = [tx ty]T.  x’= x + tx , y’= y + ty.  Where else are translations introduced? 1. Rotations - when objects are not centered at the origin. 2. Scaling - when objects/lines are not centered at the origin. if line intersects the origin then no translation.  Note: we cannot directly represent translations as matrix multiplication, as we know so far.  We can represent translations in our general transformation by using homogeneous coordinates.
  • 15.
  • 16.  Use a 3 x 3 matrix:  x' = ax + cy + tx  y' = bx + cy + ty  w’ = w  Each point is now represented by a triplet: (x, y, w).  (x/w, y/w) are called the Cartesian coordinates of the homogeneous points.
  • 17.  EX: Given 4 homogeneous points  P0=(3,4,2,.5) P1=(24,32,16,4) P2=(9,12,6,1) P3=(18,24,12,3)  Which of the homogeneous points represent a different 3d point?  P0= (3/.5,4/.5,2/.5)= (6,8,4)  P1=(24/4,32/4,16/4)= (6,8,4)  P2=(9/1,12/1,6/1)= (9,12,6)  P3=(18/3,24/3,12/3)= (6,8,4)  So p2 is different
  • 18.  General Purpose 2D transformations in homogeneous coordinate representation:  Parameters involved in scaling, rotation, reflection and shear are: a, b, c, d.  For translation: If [B]=[T][A] then p,q are translation Parameter. if [B]=[A][T] then m,n are translation parameter.
  • 19.  There are three steps for translation about an arbitrary point in space: 1. Translate by (-Tx, -Ty). 2. Scale by Sx, Sy, where Sx = new coordinate for x/ old Sy = new coordinate for y/ old 3. Translate back by (Tx, Ty)
  • 20.  EX: Apply translation to the matrix according to the shape below. 1 0 16 0 1 4 0 0 1 1 0 -2 0 1 -2 0 0 1 8 0 0 0 2 0 0 0 1 X Y Z
  • 21.  There are three steps for scaling about an arbitrary point in space: 1. Translate by (-Tx, -Ty) 2. Scale by Sx, Sy 3. Translate back by (Tx, Ty)
  • 22.
  • 23.  EX: Apply Scaling up to the matrix such that Tx= 1, Ty= 2, Sx= 4, Sy= 12. = = =  x’= x+7w y’=y+16w w’=w 1 0 -1 0 1 -2 0 0 1 X’ Y’ Z’ 4 0 0 0 12 0 0 0 1 1 0 4 0 1 12 0 0 1 X Y Z 1 0 3 0 1 4 0 0 1 1 0 4 0 1 12 0 0 1 X Y Z 1 0 7 0 1 16 0 0 1 X Y Z
  • 24.  EX: Apply Scaling down to the matrix such that Tx= 1, Ty= 2, Sx= 4, Sy= 12. = 1 0 -4 0 1 -12 0 0 1 X’ Y’ Z’ 1/4 0 0 0 1/6 0 0 0 1 1 0 1 0 1 2 0 0 1 X Y Z
  • 25.  There are three steps for rotation about an arbitrary point in space: 1. Translate by (-Px, -Py). 2. Rotate. 3. Translate back by (Px, Py)
  • 26.
  • 27.  EX: Apply rotation to the matrix such that Px= 1, Py= 4 by θ = 90 . = 1 0 -1 0 1 -4 0 0 1 X’ Y’ Z’ 0 -1 0 1 0 0 0 0 1 1 0 1 0 1 4 0 0 1 X Y Z
  • 28.  There are five steps for reflection about an arbitrary point in space: 1. Translate line to the origin. 2. Rotation about the origin. 3. Reflection matrix. 4. Reverse the rotation. 5. Translate line back.  If the line pass the origin we need only 3 steps (remove step 1 and step 5).
  • 29.  If we want to apply a series of transformations T1, T2, T3 to a set of points, we can do it in two ways: 1. We can calculate p'=T1*p, p''= T2*p', p'''=T3*p'' 2. Calculate T=T1*T2*T3 then p'''=T*p.  Translations: Translate the points by tx1, ty1, then by tx2, ty2.  Scaling: Similar to translations.  Rotations: Rotate by θ1, then by θ2 and its done by 2 ways: 1. Replace θ1, θ2 by θ=θ1+θ2. 2. calculate T1 for θ1, then T2 for θ2 then multiply them.
  • 30.  EX: Apply two scaling to the matrix such that Sx1= 2, Sy1= 3, Sx2=4, Sy2=2.  Way #1  P’= =  P’’= = 2 0 0 0 3 0 0 0 1 1 0 0 0 2 0 0 0 1 1 0 0 0 2 0 0 0 1 2 0 0 0 6 0 0 0 1 4 0 0 0 2 0 0 0 1 2 0 0 0 6 0 0 0 1 8 0 0 0 12 0 0 0 1
  • 31.  Way #2  T = =  P’’= = 2 0 0 0 3 0 0 0 1 4 0 0 0 2 0 0 0 1 8 0 0 0 6 0 0 0 1 8 0 0 0 6 0 0 0 1 1 0 0 0 2 0 0 0 1 8 0 0 0 12 0 0 0 1
  • 32.  EX: Find the new coordinate for the point (3,7,1) if you rotate the point by 180 degree then by 90 degree with clockwise.  Composite rotation : 180 + 90 = 270 degree  Since w=1 the Cartesian coordinate for the point is (3,7) 1 0 -3 0 1 -7 0 0 1 Cos270 Sin270 0 -Sin270 Cos270 0 0 0 1 1 0 3 0 1 7 0 0 1
  • 33.  EX: Suppose you have the point (2,4),rotate the point by 90 degree then by 180 degree the by 45 degree then by 45 degree then scale it by Sx=2 and Sy=4.  Composite rotation : 90+180+45+45 = 360 degree 2 0 0 0 4 0 0 0 1 Cos360 Sin360 0 -Sin360 Cos360 0 0 0 1 2 4 1
  • 34.  EX: Transform the point from left to right.  Sx1= 4/2= 2, Sy1= 5/2= 2.5, Sx2= 7/4, Sy2= 8/5  Sx= 2*7/4= 3.5, Sy= 2.5*8/5= 4 1 0 -2 0 1 -2 0 0 1 3.5 0 0 0 4 0 0 0 1 1 0 7 0 1 8 0 0 1
  • 35.  EX: Transform the point from left to right.  Sx= 3/1= 3, Sy= 3/1= 3 1 0 -1 0 1 -1 0 0 1 3 0 0 0 3 0 0 0 1 1 0 3 0 1 3 0 0 1
  • 36.  Cases where T1 * T2 = T2 * T1: T1 T2 Translation Translation Scaling Scaling Rotation Rotation Uniform Scaling Rotation
  • 37.  EX: If we scale, translate to origin then translate back is it equivalent to translate to origin, scale then translate back? (Sx=2, Sy=3, tx=3, tx=2)  Answer: No, the order of matrix is important. = = 2 0 0 0 3 0 0 0 1 1 0 -3 0 1 -2 0 0 1 1 0 3 0 1 2 0 0 1 2 0 0 0 3 0 0 0 1 2 0 0 0 3 0 0 0 1 1 0 -3 0 1 -2 0 0 1 1 0 3 0 1 2 0 0 1 2 0 3 0 3 4 0 0 1
  • 38.  EX: If we rotate the object by 90 degree then scale it ,is it equivalent to scale it then rotate it by 90 degree ? (Sx=2, Sy=3) = = 0 -1 0 1 0 0 0 0 1 2 0 0 0 3 0 0 0 1 0 -3 0 2 0 0 0 0 1 0 -1 0 1 0 0 0 0 1 2 0 0 0 3 0 0 0 1 0 -2 0 3 0 0 0 0 1
  • 39.  EX: If we rotate the object by 90 degree then scale it ,is it equivalent to scale it then rotate it by 90 degree ? (Sx=4, Sy=4) = = 0 -1 0 1 0 0 0 0 1 4 0 0 0 4 0 0 0 1 0 -4 0 4 0 0 0 0 1 0 -1 0 1 0 0 0 0 1 4 0 0 0 4 0 0 0 1 0 -4 0 4 0 0 0 0 1
  • 40.  EX: Prove that rotation then translation not equal to translation then rotation? = = not equal to the above Cosθ -Sinθ 0 Sinθ Cosθ 0 0 0 1 1 0 - tx 0 1 - ty 0 0 1 Cosθ –Sinθ -txcosθ+tysinθ Sinθ Cosθ -txsinθ-tycosθ 0 0 1 1 0 - tx 0 1 - ty 0 0 1 Cosθ -Sinθ 0 Sinθ Cosθ 0 0 0 1
  • 41.  EX: Given a solid object, if we apply uniform scale then translation to the body, is it the same as we apply translation then uniform scale? = = Sx 0 0 0 Sy 0 0 0 1 1 0 tx 0 1 ty 0 0 1 Sx Sy Sxtx 0 Sy Syty 0 0 11 0 tx 0 1 ty 0 0 1 Sx 0 0 0 Sy 0 0 0 1 Sx 0 tx 0 Sy ty 0 0 1
  • 42.  Screen Coordinates: The coordinate system used to address the screen (device coordinates).  World Coordinates: A user-defined application specific coordinate system having its own units of measure, axis, origin, etc.  Window: The rectangular region of the world that is visible.  Viewport: The rectangular region of the screen space that is used to display the window.
  • 43.  The Purpose is to find the transformation matrix that maps the window in world coordinates to the viewport in screen coordinates.  Window: (x, y space) denoted by: xmin, ymin, xmax, ymax.  Viewport: (u, v space) denoted by: umin, vmin, umax, vmax.
  • 44.  The overall transformation: Translate the window to the origin. Scale it to the size of the viewport. Translate it to the viewport location.
  • 45.
  • 46.  EX: Given (xmin=3, ymin=12, xmax=8, ymax=16) (umin=1, vmin=2, umax=2, vmax=4) Sx=1/5,Sy=1/2 Map from window to view port. 0 0 -3 0 1 -12 0 0 1 1/5 0 0 0 1/2 0 0 0 1 1 0 1 0 1 2 0 0 1
  • 47.  Map from window to view port.  (xmin=20, ymin=10, xmax=40, ymax=50)  (umin=5, vmin=4, umax=10, vmax=12)  Sx=(10-5)/(40-20)= 0.25, Sy=(12-4)/(50-10)=0.2 1 0 -20 0 1 -10 0 0 1 .25 0 0 0 .2 0 0 0 1 1 0 5 0 1 4 0 0 1