Page 137 - Computer Graphics Handout
P. 137

3.14 QUATERNIONS


          Quaternions are an extension of complex numbers that provide an alternative method for describing and manipulating rotations.
          Although less intuitive than our original approach, quaternions provide advantages for animation and hardware implementation
          of rotation.

          3.14.1 Complex Numbers and Quaternions
          In  two  dimensions,  the  use of  complex  numbers  to  represent  operations  such  as  rotation  is  well  known  to  most  students  of
          engineering and science. For example, suppose that we let i denote the pure imaginary number such that i2=−1. Recalling Euler’s
          identity,
           iθ
          e  = cos θ + i sin θ ,
          we can write the polar representation of a complex number c as
                     iθ
          c = a + ib = re  ,












          However, we are really interested in rotations in a three-dimensional space. In three dimensions, the problem is more difficult
          because to specify a rotation about the origin we need to specify both a direction (a vector) and the amount of rotation about it (a
          scalar). One solution is to use a representation that consists of both a vector and a scalar. Usually, this representation is written as
          the quaternion
          a = (q0, q1, q2, q3) = (q0, q),
          where q = (q1, q2, q3). The operations among quaternions are based on the use of three “complex” numbers i, j, and k with the
          properties
          i2 = j2 = k2 = ijk =−1.
          These numbers are analogous to the unit vectors in three dimensions, and we can write q as
          q = q1i + q2j+ q3k.
          Now we can use the relationships among i, j, and k to derive quaternion addition and multiplication. If the quaternion b is given by

                                                             137
   132   133   134   135   136   137   138   139   140   141   142