[Math] How to understand and create quaternions

interpolationquaternionsspherical-geometry

I have to multiply two quaternions to calculate a so called spherical linear interpolation between two $R^3$ coordinate systems within the interval $t = [0, 1]$.

enter image description here

I understand how to do the calculation of quaternions basicly works and how to do the slerp. There is a lot of literature available.

But I don't know how to get started: How to create initial quaternions from given coordinate system axis and angles? I basicly fail to understand the meaning of quaternions I guess.

Best Answer

In 3D space, initial coordinates are decided by the given Left-hand and Right-hand coordinates, sometimes called x-up, y-up, z-up conventions which can also be found (for example) in Wiki's EulerAngles item.

Initial Quaternions are defined corresponding to the intial x-y-z

For example, x-y-z-right hand coordinates, then 0,0,0,1 would be the initial quaternion.

Of course, the order also depends on the setting of program.

For example maybe DirectX and openGL are in different orders of the initial quaternion of the same coordinates.

And also your self programs could in one arbitrary initial order.

However, when one initial order was defined(corresponding to x-y-z), then the other 23 orders could also be well defined.

4!

(*
    24
*)

24 is the number of kinds of orders. When I decide which order was used in one 3D game engine which I cannot know the order by specification, I do experiments.

Maybe you could find a Matrix to Quaternion program, and then do rotations in Matrix, then convert the combined final matrix to Quaternions will lead you a good comprehension.

Related Question