lecture 7
Download
Skip this Video
Download Presentation
Lecture 7

Loading in 2 Seconds...

play fullscreen
1 / 34

Lecture 7 - PowerPoint PPT Presentation


  • 92 Views
  • Uploaded on

Lecture 7. Geometrical Transformations: 2D transformations 3D transformations Matrix representation OpenGL functions. Rendering Pipeline. Rendering Pipeline. Rendering Pipeline. Rendering Pipeline. Basic 2D Transformations. Basic 2D Transformations. Basic 2D Transformations.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Lecture 7' - nyla


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
lecture 7

Lecture 7

Geometrical Transformations:

2D transformations

3D transformations

Matrix representation

OpenGL functions

2x2 matrices15
2x2 matrices
  • Only rotation, scaling, and shear can be represented in 2x2 matrix form.
  • These are linear transformations.
opengl matrix stacks
OpenGL Matrix Stacks

OpenGL works with stacks of 4x4 matrices:

glMatrixMode(enum mode);

mode:

GL_MODELVIEWGL_PROJECTIONGL_TEXTURE

Specifies whether the modelview, projection or texture matrix will be modified.

opengl matrix stacks29
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.

opengl matrix stacks30
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.

opengl matrix stacks31
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

opengl matrix stacks32
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.

opengl transformations
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.

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