03 - Coordinate Syst..

advertisement
Last time:
Primitives
Coordinate systems
This time
Coordinate systems
Transformations
Linear Algebra
Examples:
Model airplane (left in a tailspin)
Monitor / page
Other examples:
Whiteboard
Paper (each piece)
Within the room
Ego centric (forward relative to me)
Screen vs. window
1st quadrant coordinates vs. upper left corner coordinates
Normalized Device Coordinates
Convenient coordinates (0-100, same in both directions)
Idea:
Work in convenient coordinate systems
Each piece can have its own
Put coordinates together as needed
Page 1 of 5
Changing coordinate systems
Where does a point in one coordinate system go into the other?
Need to know the relationship between coordinate systems
What do we need to know to change coordinate systems:
Where does the origin go?
Where does each basis vector go?
If we don’t consider the origin – it’s multiplication
We consider what happens to VECTORS – we’re not worried about origin (yet)
Picture
Where do basis vectors go (global to local, left to right)
Where do vectors go (right to left: Transformation)
Matrix * vector multiplication
Matrix is a set of basis vectors
Transforms from one coordinate system into another
Sloppiness – rows vs. column vectors
Another way to think about it: Transformations
Functions: maps tuples to tuples (vectors to vectors)
R^n -> R^n
F(x,y) = [ … ]
Easy way to effect a large number of points (VECTORS)
What happens to the object --- what happens to the coordinate system that the object is in
Where does each point on the piece of graph paper go
If linear, enough just to know what happens to 2 points
Can be complex functions (deformations)
Important case is linear function (linear combinations, matrix multiplication)
Page 2 of 5
Composition of functions
x->F->G->H->x’
x’ = H ( G ( F ( x ) ) )
Page 3 of 5
Linear Transformations
Output on each axis is a linear combination of inputs
Matrix multiplication [ abcd] [xy] = [ax+by, cx+dy]
Note:
Basis vectors (where do the unit axes go)
Preserves zero
Straight lines -> straight lines
Need for inverses
Application is matrix vector multiply
Composition is matrix multiply
Post-Multiply convention
F(x) = F x
(points in on right, answer out on left)
Basic transforms
Scale, nuscale, reflect, skew
Translation is not a linear operator (doesn’t persevere 0)
Affine transformation (linear + translation)
Homogeneous coordinates
Real value comes later for projections
Rotations
Rigid – but with fixed zero point (can always translate and translate back)
-
Preserves distance
Preserves handedness (not a reflection)
Preserves zero
Special set of matrices have this property
-
Orthogonal
Normal
Positive Determinant
Page 4 of 5
Linear Algebra Things we need here:
-
Length of a vector, normality
Determinant (signed area of the parallelogram)
Orthogonal -> Projection -> Dot Product
Page 5 of 5
Download