SlideShare a Scribd company logo
Amity Institute of Information Technology
AIIT
COMPUTER GRAPHICS
Two Dimensional Geometric
Transformation
AMITY UNIVERSITY, NOIDA
INDIA
Amity Institute of Information Technology
AIIT
Contents
– Why transformations
– Transformations
• Translation
• Scaling
• Rotation
• Reflection
• Shearing
– Homogeneous coordinates
– Combining transformations
Amity Institute of Information Technology
AIIT
Transformations
• In graphics, once we have an object described,
transformations are used to move that object, scale it
and rotate it
• The process of change in size, orientation or positions
of objects by a mathematical operation is called
Transformation.
Amity Institute of Information Technology
AIIT
Types of Transformation
1) Geometric Transformations: In this type of
transformations, the object itself is moved relative to
a stationary coordinate system or background.
2) Coordinate Transformations: In this type of
transformation, the object is held stationary while the
coordinate system is moved relative to the object.
Amity Institute of Information Technology
AIIT
Cartesian Coordinate System
• A number line can be used to represent a number or solution of an
equation that only has one variable. It is sufficient to describe the
solution of one-valued equations because they all are single-
dimensional.
• But as the number of variables in an equation increases, it is not
enough. For example when the number of variables in an
equation becomes two, there will be pair of numbers as a solution.
This is why the concept of the number line has to be extended.
There should be 2 number lines now, but how will we show our
solution on it?
• So, instead of a line, let’s define a plane to plot the solutions now.
Amity Institute of Information Technology
AIIT
Cartesian Plane and Coordinates
• Cartesian Plane:
• A Cartesian plane is defined by two perpendicular number lines, X
and Y. It extends to infinity in both directions. It has a centre
usually denoted by O.
• The horizontal line is called X-axis while the vertical line is
called Y-axis.
• Cartesian Coordinates:
• Cartesian Coordinates are used to mark the plane about a point.
How far up/down or how far left/right it is.
• They are always written in a certain order:
• Horizontal distance
• Vertical Distance
• This is called an “ordered pair” (a pair of numbers in a special
order) and usually, the numbers are separated by a comma, and
parentheses are put around the whole thing like (5,4).
Amity Institute of Information Technology
AIIT
Types of Transformation
1. Translation
2. Scaling
3. Rotation
4. Reflection
5. Shearing
Amity Institute of Information Technology
AIIT
Translation
• Simply moves an object from one position to another
• xnew = xold + tx ynew = yold + ty
• The pair (tx , ty) is called translation vector or shift vector
Note: House shifts position relative to origin
y
x
0
1
1
2
2
3 4 5 6 7 8 9 10
3
4
5
6
Amity Institute of Information Technology
AIIT
Translation Example
y
x
0 1
1
2
2
3 4 5 6 7 8 9 10
3
4
5
6
(1, 1) (3, 1)
(2, 3)
(6, 4)
tx
(7, 2)
(5, 2)
=4
=1
ty
Amity Institute of Information Technology
AIIT
• In matrix representation we can write translation as
Amity Institute of Information Technology
AIIT
Amity Institute of Information Technology
AIIT
• Rotation can be represented as:
Amity Institute of Information Technology
AIIT
Amity Institute of Information Technology
AIIT
Scaling Example
y
0 1
1
2
2
3 4 5 6 7 8 9 10
3
4
5
6
(1, 1) (3, 1)
(2, 3)
Scaling vectors=(2,2)
Amity Institute of Information Technology
AIIT
Scaling transformation can be represented as
Amity Institute of Information Technology
AIIT
Reflection and Shearing
Amity Institute of Information Technology
AIIT
Reflection
• A reflection is a transformation that produces a mirror image
of an object relative to an axis of reflection. We can choose an
axis of reflection in the xy plane or perpendicular to the xy
plane.
Y
X
O
Original
object
Reflected
object
Amity Institute of Information Technology
AIIT
Reflection Transformation matrix
Reflection about
Y-axis
-1 0 0
0 1 0
0 0 1
Reflection about
X-axis
1 0 0
0 -1 0
0 0 1
Reflection about
origin
-1 0 0
0 -1 0
0 0 1
Reflection about diagonal axis (line
y=x)
0 1 0
1 0 0
0 0 1
Reflection about
Line y = - x
0 -1 0
- 1 0 0
0 0 1
Amity Institute of Information Technology
AIIT
Shearing
• A transformation that slants the shape of an object is called the
shear transformation.
• Two common shearing transformations are
– X-shear
– Y-shear
X-Shear
• The X shear preserves the y coordinates, but changes the x
values which causes vertical lines to tilt right or left.
Amity Institute of Information Technology
AIIT
Y Shear
• The Y shear preserves the x coordinates, but changes
the y values which causes horizontal lines to tilt up or
down.
Amity Institute of Information Technology
AIIT
Inverse Geometric Transformation
• Each geometric transformation has an inverse which is
described by the opposite operation performed by the
transformation.
Amity Institute of Information Technology
AIIT
Homogeneous Coordinates
Amity Institute of Information Technology
AIIT
Homogeneous Coordinates
• To express any two-dimensional transformation as a matrix
multiplication, we represent each Cartesian coordinate position
(x,y) with the homogeneous coordinate triple(xh,yh,h) where
x = xh/ h y= yh /h
• But it is convenient to have h = 1. Therefore, each two-
dimensional position can be represented with homogenous
coordinate as (x, y, 1).
• Other values for parameter h are needed in matrix formulations
of 3-D viewing transformations.
• Expressing positions in homogeneous coordinates allows us to
represent all geometric transformation equations as matrix
multiplication.
• Coordinates are represented with three-element column
vectors,and tranformation operations are written as 3 by 3
matrices.
Amity Institute of Information Technology
AIIT
Composite Transformation
• A Composite Transformation is a transformation that consists
of more than one step to the transformation.
• For example, translate an object and then, do a second
translation on the product, to again move the object.
• There can be a combination of two different transformations.
For example, translate the object and then perform a size
transformation.
Amity Institute of Information Technology
AIIT
Numerical 1
• Find the matrix that represents rotation of an object by
30 degree about the origin
• What are the new coordinates of the point P(2,-4) after
the rotation.
Amity Institute of Information Technology
AIIT
Numerical 2
• Q) Translate a point P (2,5) by 3 units in x direction
and 4 units in Y direction.
Amity Institute of Information Technology
AIIT
Numerical 3
• Translate a polygon with coordinates A(2,5) B(7,10)
and C(10, 2) by 3 units in X direction and 4 units in Y
direction.
Amity Institute of Information Technology
AIIT
Numerical 4
• Find the transformation that scales (w.r.t origin) by
(i) a units in x direction
(ii) b units in y direction
(iii) a units in the x direction and b units in the y direction
Amity Institute of Information Technology
AIIT
Numerical 5
• Q) Scale the polygon with coordinates A(2,5) B(7,10)
and C(10,2) by two units in X direction and two units in
Y direction.
Amity Institute of Information Technology
AIIT
General Pivot Point Rotation
1) Translate the object so that the pivot-point position is
moved to the coordinate origin.
2). Rotate the object about the coordinate origin.
3).Translate the object so that the pivot point is returned
to its original position.
Amity Institute of Information Technology
AIIT
General Fixed Point Scaling
• Translate object so that the fixed point coincides with
the coordinate origin.
• Scale the object with respect to the coordinate origin.
• Use the inverse translation of step 1 to return the
object to its original position.
Amity Institute of Information Technology
AIIT
Numerical 6
• Perform a 45 degree rotation A(0,0), B(1,1) , C(5,2)
a) About the origin b) About P(-1,-1).
Amity Institute of Information Technology
AIIT
Numerical 7
• Q) Prove that two successive 2D rotations are additive.
Amity Institute of Information Technology
AIIT
Numerical 8
• Magnify a triangle with vertices A (0,0), B(1,1) and
C(5,2) to twice its size while keeping C(5,2) fixed.
Amity Institute of Information Technology
AIIT
Numerical 9
• Find a transformation of triangle A(1,0), B(0,1), C(1,1)
by rotating 45 degree about the origin and then
translating one unit in x and y direction.
Amity Institute of Information Technology
AIIT
Numerical 10
Q) Apply the shearing transformation to square with
A(0,0), B(1,0), C(1,1) and D(0,1) as given below:
(a) Shear Parameter value of 0.5 relative to the line
Yref=-1
(b) Shear Parameter value of 0.5 relative to the line
Xref=-1
Amity Institute of Information Technology
AIIT
Numerical 12
• Describe the transformation that rotates an object point
Q(x,y) θ degree about a fixed center of rotation p(h,k),
and find the matrix for rotation about a point p(h,k)
Amity Institute of Information Technology
AIIT
Numerical 13
• Reflect the diamond shaped polygon whose vertices
are A(-1,0), B(0,-2), C(1,0) and D(0,2) about
(a) The horizontal line y=2
(b) The vertical line x=2
(c) The line y=x+2
Amity Institute of Information Technology
AIIT
Solution
Amity Institute of Information Technology
AIIT
Amity Institute of Information Technology
AIIT
THANK YOU

More Related Content

Similar to Module 4_New.pptx

module 3 ppt2 (1).pptx
module 3 ppt2 (1).pptxmodule 3 ppt2 (1).pptx
module 3 ppt2 (1).pptx
RADHIKAB20
 
Transformational geometry
Transformational geometryTransformational geometry
Transformational geometry
Neil_Plays
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
Selvakumar Gna
 
Geometric transformations and projections
Geometric transformations and projectionsGeometric transformations and projections
Geometric transformations and projections
Jaya Teja
 
Reflection transformation
Reflection transformationReflection transformation
Reflection transformation
Mani Kanth
 
Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
Balamurugan M
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
Amol Gaikwad
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
Nareek
 
Chapter_2_Representing Position and Orientation.pdf
Chapter_2_Representing Position and Orientation.pdfChapter_2_Representing Position and Orientation.pdf
Chapter_2_Representing Position and Orientation.pdf
ssuser060b2e1
 
Matrix of linear transformation 1.9-dfs
Matrix of linear transformation 1.9-dfsMatrix of linear transformation 1.9-dfs
Matrix of linear transformation 1.9-dfs
Farhana Shaheen
 
2D Transformation in Computer Graphics
2D Transformation in Computer Graphics2D Transformation in Computer Graphics
2D Transformation in Computer Graphics
A. S. M. Shafi
 
Part 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptxPart 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptx
Khalil Alhatab
 
Introduction to Real Time Rendering
Introduction to Real Time RenderingIntroduction to Real Time Rendering
Introduction to Real Time Rendering
Koray Hagen
 
vector.pptx
vector.pptxvector.pptx
vector.pptx
ssuser7d974e
 
september4.ppt
september4.pptseptember4.ppt
september4.ppt
CharlesMatu2
 
Part 2- Transformation.pptx
Part 2- Transformation.pptxPart 2- Transformation.pptx
Part 2- Transformation.pptx
Khalil Alhatab
 
Overview of Transformation in Computer Graphics
Overview of Transformation in Computer GraphicsOverview of Transformation in Computer Graphics
Overview of Transformation in Computer Graphics
Chandrakant Divate
 
Transformations in the coordinate plane
Transformations in the coordinate planeTransformations in the coordinate plane
Transformations in the coordinate plane
dmidgette
 
Part 2- Geometric Transformation.pptx
Part 2- Geometric Transformation.pptxPart 2- Geometric Transformation.pptx
Part 2- Geometric Transformation.pptx
Khalil Alhatab
 
Exploring transformations and parent graphs
Exploring transformations and parent graphsExploring transformations and parent graphs
Exploring transformations and parent graphs
Alaina Wright
 

Similar to Module 4_New.pptx (20)

module 3 ppt2 (1).pptx
module 3 ppt2 (1).pptxmodule 3 ppt2 (1).pptx
module 3 ppt2 (1).pptx
 
Transformational geometry
Transformational geometryTransformational geometry
Transformational geometry
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
 
Geometric transformations and projections
Geometric transformations and projectionsGeometric transformations and projections
Geometric transformations and projections
 
Reflection transformation
Reflection transformationReflection transformation
Reflection transformation
 
Unit 3 notes
Unit 3 notesUnit 3 notes
Unit 3 notes
 
Unit-3 overview of transformations
Unit-3 overview of transformationsUnit-3 overview of transformations
Unit-3 overview of transformations
 
Two dimensionaltransformations
Two dimensionaltransformationsTwo dimensionaltransformations
Two dimensionaltransformations
 
Chapter_2_Representing Position and Orientation.pdf
Chapter_2_Representing Position and Orientation.pdfChapter_2_Representing Position and Orientation.pdf
Chapter_2_Representing Position and Orientation.pdf
 
Matrix of linear transformation 1.9-dfs
Matrix of linear transformation 1.9-dfsMatrix of linear transformation 1.9-dfs
Matrix of linear transformation 1.9-dfs
 
2D Transformation in Computer Graphics
2D Transformation in Computer Graphics2D Transformation in Computer Graphics
2D Transformation in Computer Graphics
 
Part 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptxPart 3- Manipulation and Representation of Curves.pptx
Part 3- Manipulation and Representation of Curves.pptx
 
Introduction to Real Time Rendering
Introduction to Real Time RenderingIntroduction to Real Time Rendering
Introduction to Real Time Rendering
 
vector.pptx
vector.pptxvector.pptx
vector.pptx
 
september4.ppt
september4.pptseptember4.ppt
september4.ppt
 
Part 2- Transformation.pptx
Part 2- Transformation.pptxPart 2- Transformation.pptx
Part 2- Transformation.pptx
 
Overview of Transformation in Computer Graphics
Overview of Transformation in Computer GraphicsOverview of Transformation in Computer Graphics
Overview of Transformation in Computer Graphics
 
Transformations in the coordinate plane
Transformations in the coordinate planeTransformations in the coordinate plane
Transformations in the coordinate plane
 
Part 2- Geometric Transformation.pptx
Part 2- Geometric Transformation.pptxPart 2- Geometric Transformation.pptx
Part 2- Geometric Transformation.pptx
 
Exploring transformations and parent graphs
Exploring transformations and parent graphsExploring transformations and parent graphs
Exploring transformations and parent graphs
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
Mohammed Sikander
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Multithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race conditionMultithreading_in_C++ - std::thread, race condition
Multithreading_in_C++ - std::thread, race condition
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 

Module 4_New.pptx

  • 1. Amity Institute of Information Technology AIIT COMPUTER GRAPHICS Two Dimensional Geometric Transformation AMITY UNIVERSITY, NOIDA INDIA
  • 2. Amity Institute of Information Technology AIIT Contents – Why transformations – Transformations • Translation • Scaling • Rotation • Reflection • Shearing – Homogeneous coordinates – Combining transformations
  • 3. Amity Institute of Information Technology AIIT Transformations • In graphics, once we have an object described, transformations are used to move that object, scale it and rotate it • The process of change in size, orientation or positions of objects by a mathematical operation is called Transformation.
  • 4. Amity Institute of Information Technology AIIT Types of Transformation 1) Geometric Transformations: In this type of transformations, the object itself is moved relative to a stationary coordinate system or background. 2) Coordinate Transformations: In this type of transformation, the object is held stationary while the coordinate system is moved relative to the object.
  • 5. Amity Institute of Information Technology AIIT Cartesian Coordinate System • A number line can be used to represent a number or solution of an equation that only has one variable. It is sufficient to describe the solution of one-valued equations because they all are single- dimensional. • But as the number of variables in an equation increases, it is not enough. For example when the number of variables in an equation becomes two, there will be pair of numbers as a solution. This is why the concept of the number line has to be extended. There should be 2 number lines now, but how will we show our solution on it? • So, instead of a line, let’s define a plane to plot the solutions now.
  • 6. Amity Institute of Information Technology AIIT Cartesian Plane and Coordinates • Cartesian Plane: • A Cartesian plane is defined by two perpendicular number lines, X and Y. It extends to infinity in both directions. It has a centre usually denoted by O. • The horizontal line is called X-axis while the vertical line is called Y-axis. • Cartesian Coordinates: • Cartesian Coordinates are used to mark the plane about a point. How far up/down or how far left/right it is. • They are always written in a certain order: • Horizontal distance • Vertical Distance • This is called an “ordered pair” (a pair of numbers in a special order) and usually, the numbers are separated by a comma, and parentheses are put around the whole thing like (5,4).
  • 7. Amity Institute of Information Technology AIIT Types of Transformation 1. Translation 2. Scaling 3. Rotation 4. Reflection 5. Shearing
  • 8. Amity Institute of Information Technology AIIT Translation • Simply moves an object from one position to another • xnew = xold + tx ynew = yold + ty • The pair (tx , ty) is called translation vector or shift vector Note: House shifts position relative to origin y x 0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6
  • 9. Amity Institute of Information Technology AIIT Translation Example y x 0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6 (1, 1) (3, 1) (2, 3) (6, 4) tx (7, 2) (5, 2) =4 =1 ty
  • 10. Amity Institute of Information Technology AIIT • In matrix representation we can write translation as
  • 11. Amity Institute of Information Technology AIIT
  • 12. Amity Institute of Information Technology AIIT • Rotation can be represented as:
  • 13. Amity Institute of Information Technology AIIT
  • 14. Amity Institute of Information Technology AIIT Scaling Example y 0 1 1 2 2 3 4 5 6 7 8 9 10 3 4 5 6 (1, 1) (3, 1) (2, 3) Scaling vectors=(2,2)
  • 15. Amity Institute of Information Technology AIIT Scaling transformation can be represented as
  • 16. Amity Institute of Information Technology AIIT Reflection and Shearing
  • 17. Amity Institute of Information Technology AIIT Reflection • A reflection is a transformation that produces a mirror image of an object relative to an axis of reflection. We can choose an axis of reflection in the xy plane or perpendicular to the xy plane. Y X O Original object Reflected object
  • 18. Amity Institute of Information Technology AIIT Reflection Transformation matrix Reflection about Y-axis -1 0 0 0 1 0 0 0 1 Reflection about X-axis 1 0 0 0 -1 0 0 0 1 Reflection about origin -1 0 0 0 -1 0 0 0 1 Reflection about diagonal axis (line y=x) 0 1 0 1 0 0 0 0 1 Reflection about Line y = - x 0 -1 0 - 1 0 0 0 0 1
  • 19. Amity Institute of Information Technology AIIT Shearing • A transformation that slants the shape of an object is called the shear transformation. • Two common shearing transformations are – X-shear – Y-shear X-Shear • The X shear preserves the y coordinates, but changes the x values which causes vertical lines to tilt right or left.
  • 20. Amity Institute of Information Technology AIIT Y Shear • The Y shear preserves the x coordinates, but changes the y values which causes horizontal lines to tilt up or down.
  • 21. Amity Institute of Information Technology AIIT Inverse Geometric Transformation • Each geometric transformation has an inverse which is described by the opposite operation performed by the transformation.
  • 22. Amity Institute of Information Technology AIIT Homogeneous Coordinates
  • 23. Amity Institute of Information Technology AIIT Homogeneous Coordinates • To express any two-dimensional transformation as a matrix multiplication, we represent each Cartesian coordinate position (x,y) with the homogeneous coordinate triple(xh,yh,h) where x = xh/ h y= yh /h • But it is convenient to have h = 1. Therefore, each two- dimensional position can be represented with homogenous coordinate as (x, y, 1). • Other values for parameter h are needed in matrix formulations of 3-D viewing transformations. • Expressing positions in homogeneous coordinates allows us to represent all geometric transformation equations as matrix multiplication. • Coordinates are represented with three-element column vectors,and tranformation operations are written as 3 by 3 matrices.
  • 24. Amity Institute of Information Technology AIIT Composite Transformation • A Composite Transformation is a transformation that consists of more than one step to the transformation. • For example, translate an object and then, do a second translation on the product, to again move the object. • There can be a combination of two different transformations. For example, translate the object and then perform a size transformation.
  • 25. Amity Institute of Information Technology AIIT Numerical 1 • Find the matrix that represents rotation of an object by 30 degree about the origin • What are the new coordinates of the point P(2,-4) after the rotation.
  • 26. Amity Institute of Information Technology AIIT Numerical 2 • Q) Translate a point P (2,5) by 3 units in x direction and 4 units in Y direction.
  • 27. Amity Institute of Information Technology AIIT Numerical 3 • Translate a polygon with coordinates A(2,5) B(7,10) and C(10, 2) by 3 units in X direction and 4 units in Y direction.
  • 28. Amity Institute of Information Technology AIIT Numerical 4 • Find the transformation that scales (w.r.t origin) by (i) a units in x direction (ii) b units in y direction (iii) a units in the x direction and b units in the y direction
  • 29. Amity Institute of Information Technology AIIT Numerical 5 • Q) Scale the polygon with coordinates A(2,5) B(7,10) and C(10,2) by two units in X direction and two units in Y direction.
  • 30. Amity Institute of Information Technology AIIT General Pivot Point Rotation 1) Translate the object so that the pivot-point position is moved to the coordinate origin. 2). Rotate the object about the coordinate origin. 3).Translate the object so that the pivot point is returned to its original position.
  • 31. Amity Institute of Information Technology AIIT General Fixed Point Scaling • Translate object so that the fixed point coincides with the coordinate origin. • Scale the object with respect to the coordinate origin. • Use the inverse translation of step 1 to return the object to its original position.
  • 32. Amity Institute of Information Technology AIIT Numerical 6 • Perform a 45 degree rotation A(0,0), B(1,1) , C(5,2) a) About the origin b) About P(-1,-1).
  • 33. Amity Institute of Information Technology AIIT Numerical 7 • Q) Prove that two successive 2D rotations are additive.
  • 34. Amity Institute of Information Technology AIIT Numerical 8 • Magnify a triangle with vertices A (0,0), B(1,1) and C(5,2) to twice its size while keeping C(5,2) fixed.
  • 35. Amity Institute of Information Technology AIIT Numerical 9 • Find a transformation of triangle A(1,0), B(0,1), C(1,1) by rotating 45 degree about the origin and then translating one unit in x and y direction.
  • 36. Amity Institute of Information Technology AIIT Numerical 10 Q) Apply the shearing transformation to square with A(0,0), B(1,0), C(1,1) and D(0,1) as given below: (a) Shear Parameter value of 0.5 relative to the line Yref=-1 (b) Shear Parameter value of 0.5 relative to the line Xref=-1
  • 37. Amity Institute of Information Technology AIIT Numerical 12 • Describe the transformation that rotates an object point Q(x,y) θ degree about a fixed center of rotation p(h,k), and find the matrix for rotation about a point p(h,k)
  • 38. Amity Institute of Information Technology AIIT Numerical 13 • Reflect the diamond shaped polygon whose vertices are A(-1,0), B(0,-2), C(1,0) and D(0,2) about (a) The horizontal line y=2 (b) The vertical line x=2 (c) The line y=x+2
  • 39. Amity Institute of Information Technology AIIT Solution
  • 40. Amity Institute of Information Technology AIIT
  • 41. Amity Institute of Information Technology AIIT THANK YOU