Ask Your Question

Revision history [back]

N.<c,d,a1,a2,a3,a4,b1,b2,b3,b4,s> = QQ[]
H.<i,j,k> = QuaternionAlgebra(c,d)
a = a1 + a2 * i + a3 * j + a4 * k
b = b1 + b2 * i + b3 * j + b4 * k
a+b
a*b

From http://www.wstein.org/edu/2010/414/projects/hoon_kwon.pdf

Seems to gibe better results

Now I just need to figure out how to define vector and rotate it with quaternion.

N.<c,d,a1,a2,a3,a4,b1,b2,b3,b4,s> = QQ[]
H.<i,j,k> = QuaternionAlgebra(c,d)
a = a1 + a2 * i + a3 * j + a4 * k
b = b1 + b2 * i + b3 * j + b4 * k
a+b
a*b

From http://www.wstein.org/edu/2010/414/projects/hoon_kwon.pdf

Seems to gibe give better results

Now I just need to figure out how to define vector and rotate it with quaternion.