Transformations I CS5600Computer Graphics by Rich Riesenfeld 27 February 2002 Lecture Set 5.

Slides:



Advertisements
Similar presentations
Computer Graphics Lecture 4 Geometry & Transformations.
Advertisements

Geometric Transformations
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
Three Dimensional Modeling Transformations
Transformations II Week 2, Wed Jan 17
HCI 530 : Seminar (HCI) Damian Schofield. HCI 530: Seminar (HCI) Transforms –Two Dimensional –Three Dimensional The Graphics Pipeline.
2D Geometric Transformations
Transformations II CS5600 Computer Graphics Rich Riesenfeld Spring 2005 Lecture Set 7.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
2D/3D Geometric Transformations CS485/685 Computer Vision Dr. George Bebis.
Viewing Transformations CS5600 Computer Graphics by Rich Riesenfeld 5 March 2002 Lecture Set 11.
Ch. 2: Rigid Body Motions and Homogeneous Transforms
Transformations II CS5600 Computer Graphics by Rich Riesenfeld 4 March 2002 Lecture Set 6.
©College of Computer and Information Science, Northeastern UniversityJune 26, CS U540 Computer Graphics Prof. Harriet Fell Spring 2009 Lecture 11.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS 450: Computer Graphics 2D TRANSFORMATIONS
CS 450: COMPUTER GRAPHICS 3D TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
©College of Computer and Information Science, Northeastern UniversitySeptember 9, CS 4300 Computer Graphics Prof. Harriet Fell Fall 2011 Lecture.
Transformations Aaron Bloomfield CS 445: Introduction to Graphics
Transformation of Graphics
Transformations Dr. Amy Zhang.
Transformation & Projection Feng Yu Proseminar Computer Graphics :
Geometric Transformations Jehee Lee Seoul National University.
2003CS Hons RW778 Graphics1 Chapter 5: Transforming Objects 5.2 Introduction to Transformations 5.2 Introduction to Transformations –Affine transformations.
2D Geometric Transformations
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
1 CS 430/536 Computer Graphics I 3D Transformations World Window to Viewport Transformation Week 2, Lecture 4 David Breen, William Regli and Maxim Peysakhov.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Jinxiang Chai Composite Transformations and Forward Kinematics 0.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
Student Name Server Spring 2005Utah School of Computing1 What is “ Perspective ?” A mechanism for portraying 3D in 2D “ True Perspective ” corresponds.
1 Computer Graphics Week9 -3D Geometric Transformation.
Chapter 9 Transformations.
CS559: Computer Graphics Lecture 8: 3D Transforms Li Zhang Spring 2008 Most Slides from Stephen Chenney.
Transformation.
Computer Graphics 3D Transformations. Translation.
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
Geometric Transformations Hearn & Baker Chapter 5 Some slides are taken from Robert Thomsons notes.
Geometric Transformations
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
Geometric Transformations Sang Il Park Sejong University Many slides come from Jehee Lee’s.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Geometric Transformations UBI 516 Advanced Computer Graphics Aydın Öztürk
3-D Geometric Transformations
3D Geometric Transformation
3D Geometric Transformation
3-D Transformational Geometry CS418 Computer Graphics John C. Hart.
Affine Geometry.
CS559: Computer Graphics Lecture 9: 3D Transformation and Projection Li Zhang Spring 2010 Most slides borrowed from Yungyu ChuangYungyu Chuang.
Instructor: Mircea Nicolescu Lecture 9
1 By Dr. HANY ELSALAMONY.  We have seen how to create models in the 3D world. We discussed transforms in lecture 3, and we have used some transformations.
Types of Rigid Motion Translation Rotation Reflection Objective - To describe and interpret translations and reflections in the coordinate plane.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
2D Transformation Homogenous Coordinates Scale/Rotate/Reflect/Shear: X’ = XT Translate: X’ = X + T Multiple values for the same point e.g., (2, 3, 6)
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Modeling Transformation
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Transforms.
3. Transformation
Geometric Transformations Hearn & Baker Chapter 5
Computer Graphics Transformations
CS5600 Computer Graphics by Rich Riesenfeld 4 March 2002
Viewing Transformations
Transformations.
TWO DIMENSIONAL TRANSFORMATION
Presentation transcript:

Transformations I CS5600Computer Graphics by Rich Riesenfeld 27 February 2002 Lecture Set 5

CS Transformations and Matrices Transformations are functions Matrices are functions representations Matrices represent linear transf’s

CS What is a 2D Linear Transf ? Recall from Linear Algebra:

CS Example: Scale in x

CS Example: Scale in x by 2 What is the graphical view?

CS Scale in x by 2

CS5600 7

8

9

10 Summary on Scale “Scale then add,” is same as “Add then scale”

CS Matrix Representation Scale in x by 2:

CS Matrix Representation Scale in y by 2:

CS Matrix Representation Overall Scale by 2:

CS Matrix Representation Showing Same

CS What about Rotation? Is it linear?

CS Rotate by

CS Rotate by : 1 st Quadrant

CS Rotate by : 1 st Quadrant

CS Rotate by : 2 nd Quadrant

CS Rotate by : 2 nd Quadrant

CS Rotate by : 2 nd Quadrant

CS Summary of Rotation by

CS Summary (Column Form)

CS Using Matrix Notation (Note that unit vectors simply copy columns)

CS General Rotation by Matrix

CS Who had linear algebra? Who understand matrices?

CS What do the off diagonal elements do?

CS Off Diagonal Elements

CS Example 1 S

CS Example 1 S

CS Example 1 T(S)

CS Example 2 S

CS Example 2 S

CS Example 2 T(S)

CS Summary Shear in x: Shear in y:

CS Double Shear

CS Sample Points: unit inverses

CS Geometric View of Shear in x

Another Geometric View of Shear in x 39

Another Geometric View of Shear in x 40

CS Geometric View of Shear in y

Another Geometric View of Shear in y h h 42

Another Geometric View of Shear in y 43

CS “Lazy 1”

CS Translation in x

CS Translation in x

CS Homogeneous Coordinates

CS Homogeneous Coordinates

CS Homogeneous Coordinates Homogeneous term effects overall scaling

Homogeneous Coordinates An infinite number of points correspond to (x,y,1). They constitute the whole line (tx,ty,t). w = 1 (tx,ty,t) (x,y,1)

CS We’ve got Affine Transformations Linear + Translation

CS Compound Transformations Build up compound transformations by concatenating elementary ones Use for complicated motion Use for complicated modeling

CS Elementary Transformations Scale Rotate Translate Shear (Reflect)

CS Refection about y-axis

CS Reflection about y-axis

CS Reflection about x-axis

CS Reflection about x-axis

Is Reflection “Elementary?” Can we effect reflection in an elementary way? (More elementary means scale, shear, rotation, translation.) 58

CS Reflection is Scale (-1)

CS Example:Move clock hands

CS Example:Move clock hands

CS Example:Move clock hands

CS Example:Move clock hands

CS Clock Transformations Translate to Origin Move hand with rotation Move hand back to clock Do other hand

CS Clock Transformations

CS Clock Transformations

CS Map [a,b] [0,1] 0 [ ] ab 1

CS Map [a,b] [0,1] Translate to Origin Map x to translated interval

CS Map [a,b] [0,1] Normalize the interval Map x to normalized interval

CS Map [a,b] [0,1]

CS Just Look at This is a homogeneous form for 1D

CS Map [a,b] [-1,1] 0 [ ] +1 a b

CS Map [a,b] [-1,1] Translate center of interval to origin Normalize interval to [-1,1]

CS Map [a,b] [-1,1] Substitute x =a (analogous for x =b) : x

CS Now Map [a,b] [c,d] First map [a,b] to [0,1] –(We already did this) Then map [0,1] to [c,d]

CS Now Map [a,b] [c,d] Scale [0,1] by (d-c) Then translate by c That is, in 1D homogeneous form:

CS All Together: [a,b] [c,d]

CS Now Map Rectangles

CS Transformation in x and y

This is the Viewport Transformation Good for mapping objects from one coordinate system to another This is what we do with windows and viewports 80

CS D Transformations Scale Rotate Translate Shear

CS D Scale in x

CS D Scale in x

CS D Scale in y

CS D Scale in z

CS Overall 3D Scale

CS Overall 3D Scale Same in x,y and z:

What is a Positive Rotation in 3D ? Sit at end of given axis Look at Origin CC Rotation is in Positive direction 88

3D Positive Rotations

CS D Rotation about z-axis by We have already done this:

CS D Rotation about x-axis by

CS D Rotation about x-axis

3D Rotation about y-axis by 93

CS D Rotation about y-axis

CS Elementary Transformations Scale Rotate Translate Shear (Reflect)

CS Consider an arbitrary 3D rotation What is its inverse? What is its transpose? Can we constructively elucidate this relationship?

Want to rotate by about arbitrary axis a 97

CS First rotate about by Now in the (y-z)-plane

CS Then rotate about by Rotate in the (y-z)-plane

Now perform rotation about - Now aligned with z-axis 100

Now perform rotation about - Now aligned with z-axis 101

CS Then rotate about by Rotate again in the (y-z)-plane

CS Then rotate about by Now to original position of a

We effected a rotation by about arbitrary axis a 104

We effected a rotation by about arbitrary axis a 105

CS Rotation about an arbitrary axis Rotation about a-axis can be effected by a composition of 5 elementary rotations We show arbitrary rotation as succession of 5 rotations about principal axes

CS In matrix terms,

CS Similarly, so,

CS Recall, Consequently, for because,

CS It follows directly that,

CS

CS Constructively, we have shown, This will be useful later

CS D Translation in x

CS D Translation in y

CS D Translation in z

CS D Shear in x -direction

CS D Shear in x -direction

CS D Shears:clamp a principal plane, shear in other 2 DoFs

CS D Shear in y -direction

CS D Shear in y -direction

CS D Shear in z -direction

CS D Shear in z

CS D Shear in z

CS What is “Perspective?” A mechanism for portraying 3D in 2D “True Perspective” corresponds to projection onto a plane “True Perspective” corresponds to an ideal camera image

Many Kinds of Perspective Used Mechanical Engineering Cartography Art

CS Perspective in Art Naïve (wrong) Egyptian Cubist (unrealistic) Esher –Impossible (exploits local property) –Hyperpolic (non-planar) –etc

CS “True” Perspective in 2D (x,y) p h

CS “True” Perspective in 2D

CS “True” Perspective in 2D This is right answer for screen projection

CS “True” Perspective in 2D

End Transformations I Lecture Set 5 133