Propositions
The Großmann
Identity states that
a×(b×c)=(a⋅c)b−(a⋅b)c
The 3D vector
cross-product is anti-commutative
a×b=−(b×a)
A vector is always orthogonal to its normal
a⋅b×a=0
A quaternion written in vector form is defined as
q=(w,v)
Quaternion multiplication
using vector form is defined as
q1q2=(w1w2−v1⋅v2,w1v2+w2v1+v1×v2)
Since the quaternion we use to rotate a vector is a versor, i.e ∣q∣=1, we know that
w2=1−v⋅v
Efficient vector rotation
The classic text book approach of rotating a vector u∈R3 by using a
versor q=(w,v)
is by embedding the vector u into the augmented quaternion
p=(0,u) and
determining the rotation by
p′=(0,u′)=qpq
However, this approach requires too many multiplications and a much
better way is taking apart the expression
pq=(0,u)(w,−v)=(u⋅v,wu−u×v)
From which follows that
qpq=(w,v)(u⋅v,wu−u×v)=(w(u⋅v)−v⋅(wu−u×v),w(wu−u×v)+(u⋅v)v+v×(wu−u×v))=(0,w2u+wv×u+(u⋅v)v+wv×u+v×(v×u))=(0,u−(v⋅v)u+2wv×u+(u⋅v)v+(v⋅u)v−(v⋅v)u=(0,u+2wv×u+2(u⋅v)v−2(v⋅v)u)=(0,u+2wv×u+2v×(v×u))=(0,u+2v×(wu+v×u))
Which is a pretty nice finding! We can then rotate a vector u by
R(u)=u+2v×(wu+v×u)
Which can also be written as
tR(u)=2v×u=u+wt+v×t