anchor.diff:  ****
   
   
  -== Flip Vector
  +=== Flip Vector
   
   Given a flip stem:[q_a=(\vec{a},0)] and vector stem:[\vec{v}], we are ready to calculate the result of the flip stem:[\vec{v'}].
   
  
positive.code: :stem: latexmath
  :figure-caption!:
  
  == Before We Start
  
  Quaternion is widely used in game engines to represent 3D rotation. As a game engineer you might be using quaternion explicitly or implicitly in your daily work, but do you really understand what is going on under the hood when you are calling “rotate a vector” or “combine two rotations”? Why rotating a vector stem:[v] by quaternion stem:[q] is calculated by a “sandwich” multiplication: stem:[qvq^{-1}] ? Why rotating by quaternion stem:[q_1] then stem:[q_2] is in the reversed order: stem:[{q_2}{q_1}], and can you visualize the result rotation axis and angle?
  
  
negative.code: \end{align*}
  ++++  
  
  === Summary of Part 1
  
  In Part 1, we covered the definition of quaternion stem:[q=(x,y,z,w)], the vector form of quaternion stem:[q=(\vec{v},w)], unit quaternion stem:[q=(sin⁡\frac{θ}{2}\vec{v},cos⁡\frac{θ}{2})] and how it is used to represent a rotation.
  
  