Lecture 2 - Transformations for animation (slides)

# Product as a projection graphics lecture 2 slide 35

This preview shows page 1. Sign up to view the full content.

This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: mation matrix that moves the scene scene to that coordinate system, we need to ﬁnd it to that coordinate system, we need to ﬁnd it ! I We are given a view direction d and location C –  We are given a view direction d and location C ! To see how to get the matrix, we introduce the idea of the dot product as a To see how to get the matrix, we introduce the idea of the dot projection ! product as a projection Graphics Lecture 2: Slide 35 ! 34 / 45 The dot product asas projection ! The dot product a projection The dot product is deﬁned as •  The dot product is deﬁned as !P · u = |P||u| cos ✓ P · u = |P||u| cos θ If u is •  If u is ! I a unit vector –  a unit vector then P · then|P| c·os θ |P| cos ✓ u= P u= I along a co-ordinate axis then P · u is the ordinate of P in the –  along a co-ordinate axis then P · u is the ordinate of P in the directiondirection of u of u Graphics Lecture 2: Slide 36 ! 35 / 45 Changing axes projection Changingaxes byby projection ! Extending the idea to three dimensions we see see that •  Extending the idea to three dimensions we can canthat a change aof hange ofbe expressed asexpressed as projections using c axes can axes can be projections using the dot product the dot product ! For example, call the ﬁrst coordinate of P in the new For example, call the ﬁrst t system Px coordinate of P in the new t system Pxt ! (P C) · u Px = ! = P·u C·u Pxt = (P−C)·u = P·u−C·u Graphics Lecture 2: Slide 37 ! Transforming point P Transforming P Transforming point point P Given point P in the (x, y, z ) axis system, we can calculate the corresponding point in(x, y,(z ) v, w)system, we can calculate the the Given pointpoint then the (u, y, z) asystem as: we can calculate •  Given P in P i x, axis xis system, corresponding point in the (u, v, w) system w) system as:  the corresponding point)inu = (u,· v, as: C · u t Px = (P C · the P u ! Cu Ptt = P C u = P u C ·· v Pyx = ((P C))··v = P ··v Ptt = P Pzy = ((P t Pz = ( P C v =P v C))··w = P ·· w C)...
View Full Document

## This document was uploaded on 03/26/2014.

Ask a homework question - tutors are online