Multiplication of a quaternion and a scalar to produce a vector?

1.9k Views Asked by At

I am looking at someone else's code, and in it they have a quaternion multiplied with a scalar in order to produce a vector.

He used the boost library, and can't find exactly where they defined the overloaded operator, so I need to make sense of this math myself and write it my own.

To my understanding when you multiply a quaternion with a scalar you just times each w,x,y,z component with the scalar. Problem is I don't think there is a way to convert from quaternion to vector.

Do you just take the corresponding x,y, and z values? Or am I going about this wrong?

Thanks!

1

There are 1 best solutions below

0
On

Given a quaternion $q=w+x\mathbf i+y\mathbf j+ z \mathbf k$ we call $w$ the scalar component and $\mathbf v=x\mathbf i+y\mathbf j+ z \mathbf k$ the imaginary or vector component. The correspondence with vectors in $\mathbb{R}^3$ is established for pure imaginary quaternions, i.e. quaternions with $w=0$, and we can prove that the set of these imaginary quaternions forms a vector space (with scalr multiplication by a real number ) and this space is isomorphic to $\mathbb{R}^3$ as vector space.

So I suppose that when , in your case, a quaternion is multiplied by a real number, the corresponding vector is simply the imaginary part of the quaternion as you suggest.