anchor.diff:  
   If we have an object with rotation stem:[{q_1}=(\vec{v_1},{w_1})], now we want to apply a local rotation stem:[{q_{2L}}=(\vec{v_2},{w_2})]. We can convert the local rotation stem:[q_{2L}] to world rotation stem:[q_{2W}] by converting its rotation axis into world space. Since stem:[\vec{v_2}] is in local space of stem:[q_1], converting it into world space means rotating it by stem:[q_1], so the world space rotation axis is stem:[\vec{v_{2W}}={q_1}\vec{v_2}{q_1}^{-1}].
   
  -(Technically the rotation axis is stem:[\frac{\vec{v_2}}{\left|\vec{v_2}\right|}], but since rotation angle is the same for local and world space, stem:[\left|\vec{v_2}\right|=\left|\vec{v_{2W}}\right|=sin⁡\frac{θ}{2}], we can just use stem:[{v_2}] in the calculation).
  +(Technically the rotation axis is stem:[\frac{\vec{v_2}}{\left|\vec{v_2}\right|}], but since rotation angle is the same for local and world space, stem:[\left|\vec{v_2}\right|=\left|\vec{v_{2W}}\right|=\sin⁡\frac{θ}{2}], we can just use stem:[{v_2}] in the calculation).
   
   [stem]
   ++++
  
positive.code: ++++
  \begin{align*}
  q&=(\vec{a}×\vec{b},\vec{a}·\vec{b})\\
  &=(cos\frac{θ_1}{2}(sin\frac{θ_2}{2}\vec{v_2}) + cos\frac{θ_2}{2}(sin\frac{θ_1}{2}\vec{v_1}) - (sin\frac{θ_1}{2}\vec{v_1})×(sin\frac{θ_2}{2}\vec{v_2}), cos\frac{θ_1}{2}cos\frac{θ_2}{2} - (sin\frac{θ_1}{2}\vec{v_1})·(sin\frac{θ_2}{2}\vec{v_2}))
  \end{align*}
  ++++ 
  which is the definition of quaternion multiplication of stem:[{q_1}{q_2}=(sin⁡\frac{θ_1}{2}\vec{v_1},cos⁡\frac{θ_1}{2})(sin⁡\frac{θ_2}{2}\vec{v_2},cos⁡\frac{θ_2}{2})].
  
  
negative.code: 
  *_Any rotation in 3D space is equivalent to a single rotation of angle stem:[θ] along some axis stem:[\vec{v}]._*
  
  We can use quaternion to describe this angle-axis rotation : stem:[q=(\sin⁡\frac{θ}{2}\vec{v}.x,\sin⁡\frac{θ}{2}\vec{v}.y,\sin⁡\frac{θ}{2}\vec{v}.z,\cos⁡\frac{θ}{2})], or in a more compact form stem:[q=(\sin⁡\frac{θ}{2}\vec{v},\cos⁡\frac{θ}{2})]. We call this form the vector form of a quaternion, and we will use this form throughout this article. You might be thinking why we are using stem:[\frac{θ}{2}] other than using stem:[θ] directly. I will explain that in a later section.
  
  It is easy to see the length of this quaternion stem:[\left|q\right|=\sqrt{\sin^{2}\frac{θ}{2}\left|\vec{v}\right|^{2}+\cos^{2}\frac{θ}{2}}=1]. (Remember the axis stem:[\vec{v}] is a unit vector that stem:[\left|\vec{v}\right|=1]). We call it a unit quaternion if the length stem:[\left|q\right|=1]. So we can rewrite Euler’s rotation theorem in quaternion term:
  
  *_Any 3D rotation is equivalent a unit quaternion stem:[q] that stem:[\left|q\right|=1]._*
  
  