Things left over from last time Concept of “World Coordinates” vs. Local Coordinates Intermediate co-ordinate systems Push / Pop Again (planets, show common prefixes) 3D Any 3 vectors Orthogonal Bases – right hand rule Cross product = |a| |b| sin, A x B = YaZb – ZbYa, ZaXb – XaZb, XaYb – Ya Xb X cross Y = Z Constructing a basis from 2 vectors Construct from 1 vector (largest magnitude component trick) Rotations and bases (much easier to build basis than to do sin/cos) 3D Transforms 3D homogeneous coordinates = 4x4 matrices Translate – same Scale – same nuScale (can be any axis) Shears (any axis, or pair of axis – decomposed into one axis at a time) Rotations – a whole topic unto itself 3D Rotations (an intro) Rotations (motions) vs. Orientations (configurations) vs. Rotations (relative orientations) 3 D.O.F. (point in direction, rotate around it) Since loops around space is complex – SO(3) – group of positive, orthonormal 3x3 matrices Cannot map nicely to R^3 – will be a singularity Cannot map nicely to R^4 - redundancy Rotations about an axis – always will be an axis – Basis axes, arbitrary axis Euler Theorems – Any rotation can be represented by a single rotation about an arbitrary axis (axis-angle form) – Any rotation can be represented by 3 rotations about fixed axes (Euler Angle form) – XYZ, XZX, any non-repeating set works – Each set is different (gets different singularities) Building rotations – Pick a vector (for an axis) – Pick another perpindicular vector (or make one w/cross product) – Get third vector by cross product “Euler Angles” – horrible term • Pick convention – Are axes local or global? – Local: roll, pitch, yaw – What order? • Apply 3 rotations • Good news: 3 numbers • Bad news: – Can’t add, can’t compose – Many representations for any rotation – Singularities Rot X ~~ Rot Y Rot Z - same place, 2 ways – long way from one to the other! Axis Angle – harder to think about (for most people) Rotation Vector – multiply by angle (scale length) Lots of different 360 degree rotations. Shells at different radii Scale by sin(theta)? (makes math messy) Still can’t compose or interpolate Quaternion 4D Unit Sphere Encoding rotation vectors cos, sin V Compose by multiplication Interpolate by careful formula