Advertisement

Applying Player Movement to Velocity Vectors

Started by August 11, 2013 12:16 AM
13 comments, last by Paradigm Shifter 11 years, 6 months ago

Similarly to how the inverse of an orthonormal matrix is its transpose, the inverse of a unit quaternion is its conjugate. So you never actually need to compute inverses when handling rotations.

You can pre- and post-multiply by matrices on both sides without changing the validity of a matrix equation.


Does pre-multiplication by the Identity matrix also leave the right hand side unchanged? Solving for Q1:

Q2-1 Q' = Q2-1 Q2 Q1
Q2-1 Q' = I Q1
Q2-1 Q' = Q1

Similarly to how the inverse of an orthonormal matrix is its transpose, the inverse of a unit quaternion is its conjugate. So you never actually need to compute inverses when handling rotations.


Does a unit quaternion imply a fixed angle of rotation (1 radian or something?). Would that mean an extra value needed to represent angle of rotation?
Advertisement

Does pre-multiplication by the Identity matrix also leave the right hand side unchanged?

That's what "identity" means.


Does a unit quaternion imply a fixed angle of rotation (1 radian or something?). Would that mean an extra value needed to represent angle of rotation?

No, all rotations are represented by unit quaternions.

You should try to get some general education about matrices and quaternions if you are going to be using them.

biggrin.png It's been a few years since I did my linear algebra. Never got to quaternions but I have a nice book on the subject. I think I have enough to get by now. Thanks for the replies.

The identity matrix always commutes with any other matrix, and does nothing, so IA = AI = A.

If A is invertible, then A-1 always commutes with A as well, so

AA-1 = A-1A = I

EDIT: That is a consequence of matrices with elements from a field ring forming a ring under addition and multiplication (a ring is an algebraic structure, they are based on the properties shared by integers, polynomials with coefficients from a ring, and square matrices over a field ring). In a ring, an element always commutes with its (unique) inverse (if it has one, this is not required, e.g. in the ring of integers there is no integer a such that 2a = 1) and the identity element for multiplication always commutes and is unique. Quaternions form a ring too (just not a commutative one. However, quaternions are a bit more special than matrices/rings in general in that every non-zero quaternion has a unique inverse under multiplication, so form a division ring). A commutative ring (which the quaternions aren't) in which every non-zero element has an inverse is a field.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

This topic is closed to new replies.

Advertisement