1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 18 Multiple Transformations.

Slides:



Advertisements
Similar presentations
Gursharan Singh Tatla TRANSFORMATIONS Gursharan Singh Tatla Gursharan Singh Tatla.
Advertisements

CLASS 4 CS770/870. Translation Scale Multiplying Matrices. The R C rule What happens when we do two translates? What happens when we do two scales?
Geometric Transformations
Arbitrary Rotations in 3D Lecture 18 Wed, Oct 8, 2003.
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
CS 4731: Computer Graphics Lecture 7: Introduction to Transforms, 2D transforms Emmanuel Agu.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
1 Geometrical Transformation Tong-Yee Lee. 2 Modeling Transform Specify transformation for objects Allow definitions of objects in own coordinate systems.
Course Website: Computer Graphics 3: 2D Transformations.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
CS 4731: Computer Graphics Lecture 8: 3D Affine transforms Emmanuel Agu.
2D Transformations x y x y x y. 2D Transformation Given a 2D object, transformation is to change the object’s Position (translation) Size (scaling) Orientation.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
2D Transformations. World Coordinates Translate Rotate Scale Viewport Transforms Hierarchical Model Transforms Putting it all together.
13.2 Angles and Angle Measure
3D Transformation. In 3D, we have x, y, and z. We will continue use column vectors:. Homogenous systems:. 3D Transformation glVertex3f(x, y,z);
Section 8.3 – Systems of Linear Equations - Determinants Using Determinants to Solve Systems of Equations A determinant is a value that is obtained from.
Spring 2013 Solving a System of Linear Equations Matrix inverse Simultaneous equations Cramer’s rule Second-order Conditions Lecture 7.
AN INTRODUCTION TO ELEMENTARY ROW OPERATIONS Tools to Solve Matrices.
Graphics Graphics Korea University kucg.korea.ac.kr Transformations 고려대학교 컴퓨터 그래픽스 연구실.
Lecture Notes: Computer Graphics.
4.5 Solving Systems using Matrix Equations and Inverses.
Ch X 2 Matrices, Determinants, and Inverses.
Computer Graphics 2D Transformations. 2 of 74 Contents In today’s lecture we’ll cover the following: –Why transformations –Transformations Translation.
1 Computer Graphics Week9 -3D Geometric Transformation.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Viewing CS418 Computer Graphics John C. Hart. Graphics Pipeline Homogeneous Divide Model Coords Model Xform World Coords Viewing Xform Still Clip Coords.
CS-498 Computer Vision Week 7, Day 2 Camera Parameters Intrinsic Calibration  Linear  Radial Distortion (Extrinsic Calibration?) 1.
CS-498 Computer Vision Week 7, Day 1 3-D Geometry
CSE Real Time Rendering Week 5. Slides(Some) Courtesy – E. Angel and D. Shreiner.
Computer Graphics 3D Transformations. Translation.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
Affine Transformation. Affine Transformations In this lecture, we will continue with the discussion of the remaining affine transformations and composite.
Graphics CSCI 343, Fall 2015 Lecture 16 Viewing I
Multiples and Factors.
1 Graphics CSCI 343, Fall 2015 Lecture 18 Viewing III--More Projection.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Honors Geometry.  We learned how to set up a polygon / vertex matrix  We learned how to add matrices  We learned how to multiply matrices.
Use Inverse Matrices to Solve Linear Systems Objectives 1.To find the inverse of a square matrix 2.To solve a matrix equation using inverses 3.To solve.
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.
III- 1 III 3D Transformation Homogeneous Coordinates The three dimensional point (x, y, z) is represented by the homogeneous coordinate (x, y, z, 1) In.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
1 Teaching Innovation - Entrepreneurial - Global The Centre for Technology enabled Teaching & Learning, N Y S S, India DTEL DTEL (Department for Technology.
Computer Graphics Lecture 16 Fasih ur Rehman. Last Class Homogeneous transformations Types of Transformations – Linear Transformations – Affine Transformations.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Computer Graphics 3: 2D Transformations
HOMOGENEOUS REPRESENTATION
Computer Graphics Transformations.
Graphics CSCI 343, Fall 2017 Lecture 13 More on WebGL
Computer Graphics 3: 2D Transformations
3D Geometric Transformations
Computer Graphics Transformations.
Introduction to Computer Graphics CS 445 / 645
Lecture 7 Geometric Transformations (Continued)
2D Transformations y y x x y x.
Three-Dimensional Graphics
Unit-5 Geometric Objects and Transformations-II
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Solve System by Linear Combination / Addition Method
4-4 Geometric Transformations with Matrices
TRANSFORMATION. TRANSFORMATION Foldable PRIME Original New IN MATH TERMS…. P -> P’
Transformations 고려대학교 컴퓨터 그래픽스 연구실 kucg.korea.ac.kr.
The Modelview Matrix Lecture 8 Mon, Sep 10, 2007.
Geometric Transformations
Geometric Objects and Transformations (II)
TWO DIMENSIONAL TRANSFORMATION
Warm Up 6.3 Complete the chart for the given counterclockwise rotations about the origin. 90o 180o 270o R(3, -3) S(1, 4) Use.
Presentation transcript:

1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 18 Multiple Transformations

2 Multiple Transformations We often want to perform multiple transformations on an object. For example, we might want to rotate and then translate it. The order of we perform transformations matters. Example: Start with a square centered on the origin of the XY plane. First rotate by 45 deg, then translate to the right: Now start with the same square. 1st translate to the right, then rotate by 45 deg. Rotate Translate Rotate

3 Multiple Transformations in OpenGL In OpenGL, function calls for transformations are given in the reverse order of what you want them to perform. Example: glTranslatef(0, 0, -200); glRotatef(theta, 0, 1, 0); 1st rotate about the Y axis. Then translate along the negative Z axis. How can this be? The compute executes the function calls in the order given. Why is the effect in the reverse? It all has to do with Matrix Multiplication

4 Matrices OpenGL accomplishes all transformations by way of Matrix Multiplication. A matrix is a 2 dimensional set of numbers. Examples: 2x2 Matrix 3x1 Matrix

5 Using Matrices to Solve Linear Equations Matrices can be used to solve systems of linear equations. can be written as P' To transform a point, we create a transformation matrix, M, and multiply the point P by that matrix: P' = MP Note: The order of multiplication matters. MP is not the same as PM. MP

6 Multiple Matrices To translate a point, we use a translation matrix, T: P' = TP To rotate a point, we use a rotation matrix, R: P' = RP To translate and then rotate, we multiply by T and then R: P' = TP P'' = RP' = RTP We can do this transformation all at once by creating a transformation matrix, M = RT P'' = MP

7 Transformation in OpenGL creates a Matrix OpenGL creates the matrix, M, by multiplying the current matrix by a transformation matrix with each call to glTranlatef( ), etc. glTranslatef(x, y, z);M = T glRotatef(angle, x, y, z);M = TR glScalef(sx, sy, sz);M = TRS When you define an object vertex with: glVertex3f(x, y, z); OpenGL multiplies the point by M before rendering it. This has the effect of transforming the point in the reverse order of the transformation calls.