07.01.2013 Views

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

3D graphics eBook - Course Materials Repository

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Quaternions and spatial rotation 133<br />

Quaternion arithmetic in practice<br />

Let's show how we reached the previous result. Let's develop the expression of f (in two stages), and apply the rules<br />

It gives us:<br />

which is the expected result. As we can see, such computations are relatively long and tedious if done manually;<br />

however, in a computer program, this amounts to calling the quaternion multiplication routine twice.<br />

Explaining quaternions' properties with rotations<br />

Non-commutativity<br />

The multiplication of quaternions is non-commutative. Since the multiplication of unit quaternions corresponds to<br />

the composition of three dimensional rotations, this property can be made intuitive by showing that three<br />

dimensional rotations are not commutative in general.<br />

A simple exercise of applying two rotations to an asymmetrical object (e.g., a book) can explain it. First, rotate a<br />

book 90 degrees clockwise around the z axis. Next flip it 180 degrees around the x axis and memorize the result.<br />

Then restore the original orientation, so that the book title is again readable, and apply those rotations in opposite<br />

order. Compare the outcome to the earlier result. This shows that, in general, the composition of two different<br />

rotations around two distinct spatial axes will not commute.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!