2

When converting from Euler angles to quaternion and back to Euler angles, the resulting Euler angles may not be the same as the original Euler angles. But are they always equivalent? I mean, if I apply either original Euler rotation or the resulting Euler rotation to an object, will the object end up in the same orientation either way?

Community
  • 1
  • 1
jlstrecker
  • 4,953
  • 3
  • 46
  • 60

1 Answers1

2

Yes.

Every rotation can (not neccessarily uniquely) be described using Euler angles. The same holds for quaternions. Unless you made a mistake while converting, the conversion will be such that input and output of each conversion step still describe the same rotation. Therefore by transitivity the original rotation is the same as the final one, since they are both equal to the intermediate one described by quaternions.

The only problem may come from the fact that if you are not careful, some situations might cause the algorithm of your conversion to fail, e.g. result in a division by zero for the gimbal-locked case. If you deal with these singularities correctly, then the final result will be equivalent to the initial input.

MvG
  • 57,380
  • 22
  • 148
  • 276
  • It is correct with "orientation" term, but "rotation " can be used as changing orientation during time. So one orientation can be represented by several combination of "Euler angels" that can express diffrent "rotation" For example , common practice to use "Euler angels" to represent part of animation (for user input) – minorlogic Aug 28 '15 at 14:03
  • I interpreted rotation as a single atomic operation, not as a continuous change over time. I think my use of the words is quite common, and I hope OP meant the same. A continuous rotation I would describe using some combination of axis and angular velocity, or as a quaternion exponential. The only time I've seen Euler angles being used to describe a continuous movement was in the context of celestial mechanics, where two angles would describe the plane of a trajectory and the third a position on that plane, with the implication that the last one will change over time. Is that what you meant? – MvG Aug 28 '15 at 14:26
  • Argee it is common usage,it is important TS used it in same way. P.S. Many times i sow usage of EA in animation to define simple rotational motion. – minorlogic Aug 28 '15 at 14:40