title: Series of Quaternions
body: <p>Please excuse my ignorance on quaternions (trying to learn them as I type this). In the context of 3D graphics, suppose I have a point p1 which gets transformed by a series of quaternions from q0 to qn yielding to point p2. Knowing all the quaternions to get from p1 to p2, is it possible to do the reverse to get back to p1?</p>
  
  <p>I tried something silly like this but it didn't give me what I was after:</p>
  
  <pre><code>int main(void)
  {
      vmath::vec4 p1(4.0f, 3.0f, 2.0f, 1.0f);
      print_vec4(p1);
  
      vmath::quaternion q1(1.0f, 0.0f, 0.0f, M_PI);
      vmath::vec4 p2 = p1 * q1.asMatrix();
      print_vec4(p2);
  
      vmath::quaternion q2(q1);
      q2 = q2.conjugate();
      p2 = p2 * q2.asMatrix();
      print_vec4(p2);
  
      return 0;
  }
  </code></pre>