## 3. Transformations I: Linear Transformations (vector, matrix)

3. Transformations I: Linear Transformations. Multiple Transformations (2/14) … vectors & linear transformations (4×4 matrices)

Vector is length & direction, can be represented as 2D (dx, dy) or 3D (dx, dy, dz). Add vectors adds components (visually attach tail to head). Subtract vector just add the negative (visually flip direction of minus vector). To compute the length, use pythagorean theorem. Unit vector is vector length 1, compute by dividing the vector by its length.

Dot product A dot B = AxBx + AyBy + AzBz = cos(theta) * ||A|| * ||B||. Theta is the angle between A and B. ||A|| is magnitude of A. For unit vectors, A dot B = cos(theta). Because for unit vectors, ||A|| is 1 and ||B|| is 1. Dot product can tell you which side of a surface something is on. Example take the dot product of the Normal vector (to a plane) and the View vector (to the camera); the sign (greater than or less than zero) tells you if the angle is less than or greater than 90 degrees

mepem37 :: 2013/09/28 (Saturday, September 28, 2013) :: CG intro Harvard, class videos :: No Comments »