Convert quaternions to xyz degrees

4.1k Views Asked by At

I knew quaternion for the first time a few days ago and I still don't get the way it works even when reading explanations.
All I want to do is to make a subtraction between two quaternions and convert the variations into XYZ angles (radians or degrees) but I don't know from where I have to start… Can I simply subtract values one by one to make the difference? If I apply the equations written on this site, what will be the unit of the results?
Thanks in advance.

1

There are 1 best solutions below

4
On BEST ANSWER

I knew quaternion for the first time a few days ago and I still don't get the way it works even when reading explanations.

Don't get discouraged, some of the concepts take a while.

All I want to do is to make a subtraction between two quaternions

As @rschwieb wrote in a comment, subtracting quaternions doesn't make a lot of sense geometrically. That's because quaternions as rotations operate multiplicative: you get the combination of two rotations by multiplying the quaternions, not by adding them. So the analogon to a difference of rotation angles would be the quotient of two quaternions.

convert the variations into XYZ angles

The Wikipedia page Rotation formalisms in three dimensions has a nice overview of different formalisms and how to convert between them. In particular, you should be precise whether “XYZ angles” refers to simultaneous rotations around all three axes, or to sequential rotation around each of these axes in the sense of Tait–Bryan angles.

If I apply the equations written on this site, what will be the unit of the results?

I haven't read all that, but unless stated otherwise I'd assume radians, since degrees are a pretty arbitrary choice of unit, while radians have deep mathematical connections. Also most programming languages, and definitely the Java used there, represent angles for their trigonometric functions in radians by default.