KIPA Game Engine Seminars Day 14 Jonathan Blow Ajou University December 12, 2002 1 Matrix Tricks • Review of the dot product trick – a dot b = aTb 2 Cross Product as Matrix • The skew-symmetric matrix is a trick for turning a cross product into a matrix multiply • Useful when you are doing math and need to transform cross products, invert them, etc • “skew-symmetric” because it is almost equal to its transpose, but for some negated terms 3 Dot Product as a 3x3 Matrix • (plus a step at the end to extract the value) 4 Quaternion-based rotation • x’ = qxq* • Discussion of how to expand this using Hamilton’s multiplication rules 5 Cross Product • As determinant of pseudo-matrix containing (i, j, k) – Formulation from Lounesto’s book “Clifford Algebras and Spinors” 6 v cross (v cross a) • A common expression to run into • We see r x (n x r) a lot in physics / rotation kinds of applications • Show what this means in terms of the skew symmetric matrix • (n x r) = -(r x n) 7 Cross Product and Dot Product • Cross product as area of parallelogram • As lengths of vectors times sin(theta) • Dot product as lengths of vectors times cos(theta) • What happens when we square, add, square root these terms? 8 Cross Product and Dot Product • It’s almost as though the cross and dot product are projections of the result of some “bigger product” onto orthogonal spaces – Review of unit vector and cos^2 + sin^2 = 1 • Re-discussion of the idea that any linear item can be broken into parallel and orthogonal components 9 Clifford Basis Vectors • View the products of two vectors as creating bivectors, not vectors in the same space • Algebra a bit different from Hamilton’s 10 Clifford Product • of a vector times a vector • How does this compare to the dot and cross products? • Clifford product decomposed as (a dot b) and (a wedge b) 11 Clifford Product • of a vector times a bivector 12 Clifford Inverse • of a vector 13 Mirror transform • Matrix with determinant –1 • Example with X, Y, Z axes 14 Portals, Teleports and Mirror Transforms • You can attach arbitrary transforms to portals (since you are basically “restarting” the viewing process at each portal) • A portal can look into somewhere spatially disjoint • A portal can look from a right-handed into a lefthanded space – If the view transform reverses handedness, and is pointed back into the same room, you have a mirror. 15 Least-Squares Fitting of Sample Data • Was asked as a question last week • Will do derivation now on whiteboard 16 Static Mesh LOD • (block-based) • Using alpha blending to blend between pieces • (demonstration of software in progress) 17