-Transforms

-Transforms - Transformations Transformations Bedich Bene...

This preview shows pages 1–3. Sign up to view the full content.

Transformations Bed ř ich Beneš, Ph.D. Purdue University Department of Computer Graphics © Bedrich Benes Transformations transformations are essential closely related to Cg programs (vp) the following should be a review of well-known things (is it?) © Bedrich Benes Homogenous coordinates We use homogenous coordinates in 3D A=[x,y,z,w] The relation between homogenous and Cartesian coordinates is [x,y,z]=[x/w,y/w,z/w] for w=0 the [x,y,z,w] corresponds to a vector (x,y,z) © Bedrich Benes Homogenous coordinates Advantages of using homog. coords: Linear transformations (scale, shear, translate, rotate) can be represented by matrices 4x4 Projective transformation can be represented by matrices 4x4

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Transformations Having matrix A of type 4x4 and a vertex v=[x,y,z,w] The vertex transformation is represented by the matrix multiplication v’= A v to transform a vertex only the matrix must be specified © Bedrich Benes Transformations Example: A corresponds to the translation by the vector (X T ,Y T ,Z T ) A = 1 0 0 X T 0 1 0 Y T 0 0 1 Z T 0 0 0 1 © Bedrich Benes Transformations One of the first things ever performed by hardware is matrix-to-vector multiplication Every vertex must pass a various stages of transformations
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/19/2012 for the course CGT 411 taught by Professor Staff during the Spring '08 term at Purdue.

Page1 / 7

-Transforms - Transformations Transformations Bedich Bene...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online