title: rotating coordinate system via a quaternion
body: <p>We have a gazillion spatial coordinates (x, y and z) representing atoms in 3d space, and I'm  constructing a function that will translate these points to a new coordinate system.  Shifting the coordinates to an arbitrary origin is simple, but I can't wrap my head around the next step: 3d point rotation calculations. In other words, I'm trying to translate the points from (x, y, z) to (x', y', z'), where x', y' and z' are in terms of i', j' and k', the new axis vectors I'm making with the help of the <a href="http://pypi.python.org/pypi/euclid/0.01" rel="noreferrer">euclid python module</a>.</p>
  
  <p>I <em>think</em> all I need is a euclid quaternion to do this, i.e.</p>
  
  <pre><code>&gt;&gt;&gt; q * Vector3(x, y, z)
  Vector3(x', y', z')
  </code></pre>
  
  <p>but to make THAT i believe I need a rotation axis vector and an angle of rotation. But I have no idea how to calculate these from i', j' and k'. This seems like a simple procedure to code from scratch, but I suspect something like this requires linear algebra to figure out on my own. Many thanks for a nudge in the right direction.</p>