170 likes | 299 Views
KIPA Game Engine Seminars. Day 14. Jonathan Blow Ajou University December 12, 2002. Matrix Tricks. Review of the dot product trick a dot b = a T b. Cross Product as Matrix. The skew-symmetric matrix is a trick for turning a cross product into a matrix multiply
E N D
KIPA Game Engine Seminars Day 14 Jonathan Blow Ajou University December 12, 2002
Matrix Tricks • Review of the dot product trick • a dot b = aTb
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
Dot Product as a 3x3 Matrix • (plus a step at the end to extract the value)
Quaternion-based rotation • x’ = qxq* • Discussion of how to expand this using Hamilton’s multiplication rules
Cross Product • As determinant of pseudo-matrix containing (i, j, k) • Formulation from Lounesto’s book “Clifford Algebras and Spinors”
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)
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?
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
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
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)
Clifford Product • of a vector times a bivector
Clifford Inverse • of a vector
Mirror transform • Matrix with determinant –1 • Example with X, Y, Z axes
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 left-handed space • If the view transform reverses handedness, and is pointed back into the same room, you have a mirror.
Least-Squares Fittingof Sample Data • Was asked as a question last week • Will do derivation now on whiteboard
Static Mesh LOD • (block-based) • Using alpha blending to blend between pieces • (demonstration of software in progress)