1 Lecture 7 Geometrical Transformations: 2D transformations 3D transformations Matrix representation OpenGL functions.

Slides:



Advertisements
Similar presentations
Today Composing transformations 3D Transformations
Advertisements

University of North Carolina at Greensboro
Geometric Transformations
1 Computer Graphics Chapter 6 2D Transformations.
1 Geometrical Transformation 2 Outline General Transform 3D Objects Quaternion & 3D Track Ball.
Viewing and Transformation
2/7/2001Hofstra University – CSC290B1 Review: Math (Ch 4)
1 Modeling Transformations  2D Transformations  3D Transformations  OpenGL Transformation.
Transformations Objectives Understand how transformations work in 2D and 3D Understand the concept of homogenous coordinate system Understand scene graphs.
Objectives Learn to build arbitrary transformation matrices from simple transformations Learn to build arbitrary transformation matrices from simple transformations.
1 Geometrical Transformation Tong-Yee Lee. 2 Modeling Transform Specify transformation for objects Allow definitions of objects in own coordinate systems.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
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.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
3D Rendering with JOGL Introduction to Java OpenGL Graphic Library By Ricardo Veguilla
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
TWO DIMENSIONAL GEOMETRIC TRANSFORMATIONS CA 302 Computer Graphics and Visual Programming Aydın Öztürk
Lecture Notes: Computer Graphics.
2D Geometric Transformations
Geometric transformations The Pipeline
Transformations Jehee Lee Seoul National University.
Matrices, Transformations and the 3D Pipeline Matthew Rusch Paul Keet.
3D transformations Dr Nicolas Holzschuch University of Cape Town Modified by Longin Jan Latecki
OpenGL: Introduction Yanci Zhang Game Programming Practice.
2D Transformation. Transformation changes an object’s: – Position(Translation) – Size(Scaling) – Orientation(Rotation) – Shape(Deformation) Transformation.
OpenGL Viewing and Modeling Transformation Geb Thomas Adapted from the OpenGL Programming Guidethe OpenGL Programming Guide.
1/50 CS148: Introduction to Computer Graphics and Imaging Transforms CS148: Introduction to Computer Graphics and Imaging Transforms.
2 COEN Computer Graphics I Evening’s Goals n Discuss viewing and modeling transformations n Describe matrix stacks and their uses n Show basic geometric.
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 OpenGL Transformations.
Affine Transformation. Affine Transformations In this lecture, we will continue with the discussion of the remaining affine transformations and composite.
Chapters 5 2 March Classical & Computer Viewing Same elements –objects –viewer –projectors –projection plane.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Transformations Angel Angel: Interactive Computer Graphics5E © Addison-Wesley
OpenGL: The Open Graphics Language Introduction By Ricardo Veguilla.
Introduction to Computer Graphics: Viewing Transformations Rama C
Honours Graphics 2008 Session 2. Today’s focus Vectors, matrices and associated math Transformations and concatenation 3D space.
1 Representation. 2 Objectives Introduce concepts such as dimension and basis Introduce coordinate systems for representing vectors spaces and frames.
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
Homogeneous Coordinates and Matrix Representations Cartesian coordinate (x, y, z) Homogeneous coordinate (x h, y h, z h, h) Usually h = 1. But there are.
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.
1 Geometric Transformations-II Modelling Transforms By Dr.Ureerat Suksawatchon.
1 Dr. Scott Schaefer 3D Transformations. 2/149 Review – Vector Operations Dot Product.
1 Geometric Transformations Modelling Transforms By Dr.Ureerat Suksawatchon.
Computer Graphics Lecture 16 Fasih ur Rehman. Last Class Homogeneous transformations Types of Transformations – Linear Transformations – Affine Transformations.
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Transformations. Modeling Transformations  Specify transformations for objects  Allows definitions of objects in own coordinate systems  Allows use.
OpenGL: The Open Graphics Language Technology and Historical Overview By Ricardo Veguilla.
Instructor: Dr. Shereen Aly Taie Basic Two-Dimensional Geometric Transformation 5.2 Matrix Representations and Homogeneous Coordinates 5.3 Inverse.
Computer Graphics Lecture 15 Fasih ur Rehman. Last Class Combining Transformations Affine versus Rigid body Transformations Homogenous Transformations.
Lecture 10 Geometric Transformations In 3D(Three- Dimensional)
Lecture 3 Jitendra Malik
2D Imaging and Transformation
Summary of Properties of 3D Affine Transformations
3D Geometric Transformations
2D Transformation.
Reference1. [OpenGL course slides by Rasmus Stenholt]
Introduction to Computer Graphics with WebGL
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Chapters 5/4 part2 understanding transformations working with matrices
Transformations 3 University of British Columbia
The Modelview Matrix Lecture 8 Mon, Sep 10, 2007.
Three-Dimensional Graphics
Geometric Objects and Transformations (II)
Geometrical Transformations
Transformations.
3D transformations Dr Nicolas Holzschuch University of Cape Town
TWO DIMENSIONAL TRANSFORMATION
Translation in Homogeneous Coordinates
Presentation transcript:

1 Lecture 7 Geometrical Transformations: 2D transformations 3D transformations Matrix representation OpenGL functions

2 Rendering Pipeline

3

4

5

6 Basic 2D Transformations

7

8

9 Matrix representation

10 Combination of 2D transformations

11 2x2 matrices

12 2x2 matrices

13 2x2 matrices

14 2x2 matrices

15 2x2 matrices Only rotation, scaling, and shear can be represented in 2x2 matrix form. These are linear transformations.

16 Linear transformations

17 2D Translation: 3x3 matrix

18 Homogeneous coordinates

19 Basic 2D transformations in homogeneous coordinates

20 Affine transformations

21 Projections

22 Matrix compositions

23 Matrix compositions

24 Matrix compositions

25 3D transformations

26 Basic 3D transformations

27 Basic 3D transformations

28 OpenGL Matrix Stacks OpenGL works with stacks of 4x4 matrices: glMatrixMode(enum mode); mode: GL_MODELVIEW GL_PROJECTION GL_TEXTURE Specifies whether the modelview, projection or texture matrix will be modified.

29 OpenGL Matrix Stacks glLoadIdentity(void); Clears the currently modifiable matrix for future transformation instructions. Typically we call this instruction before specifying modeling, viewing or projection transformations.

30 OpenGL Matrix Stacks Manipulating stacks: the OpenGL calls to push, pop, or multiply top of stack glLoadMatrix(void); glMultMatrix(void); glPushMatrix(void); the topmost matrix is copied glPopMatrix(void); the topmost matrix is destroyed All vertices of the object are multiplied by the matrix.

31 OpenGL Matrix Stacks Manipulating stacks: the OpenGL calls to push, pop, or multiply top of stack glLoadMatrix(const type *m); glMultMatrix(const type *m); m1 m5 m9 m13 m2 m6 m10 m14 m3 m7 m11 m15 m4 m8 m12 m16

32 OpenGL Matrix Stacks Manipulating stacks: the OpenGL calls to push, pop, or multiply top of stack glPushMatrix(void); the topmost matrix is copied glPopMatrix(void); the topmost matrix is destroyed All vertices of the object are multiplied by the matrix.

33 OpenGL Transformations glTranslate(TYPE x, TYPE y, TYPE z); Multiplies the current matrix by a translation matrix. glRotate(TYPE angle, TYPE x, TYPE y, TYPE z); Multiplies the current matrix by a rotation matrix. glScale(TYPE x, TYPE y, TYPE z); Multiplies the current matrix by a scaling matrix.

34 Summary Types of transformations: –linear –affine –projective Representation of transformations: –3x3 and 4x4 matrices –homogeneous coordinates Compositions of transformations OpenGL Matrix Instructions