Gimbal Lock Version


Starting Position

Ending Position

These we calculated by Maya. I dragged the cylinder to the horizontal position and it calculated the required change in angles

Quaternion Version


Starting Position

Ending Position


Calculations


Again the issue is with the frame interpolation, not really with the representation, but...

Euler:

Rotation in Euler Angles: (Yaw: 0, Pitch: -90, Roll: 0)

Rotation Matrix:



Rotation are applied to a pivot point in the object. In my case the pivot happens to be the center of the object, so rotation the object around it's center doesn't cause it's center to change (which is also how the position of the object is recorded).
Essentially the rotations don't direct change to posititon of the object, but here's how it would have change the position if it was applied to a dot on the top of the cylinder at the center.



Which makes sense as the top of the cylinder is now the front of the cylinder. Note this should be 2 in the actual rendering due to the pivot point (which is at (0, 0, 2)), which we have not accounted for, but our graphics engine will.

Quaternion:

-90 degree rotation quaternion:





Which is identical to Euler rotation in-terms of final position (as it should be).

Notes


We can clearly see the Euler based animation adds unnecessary rotation.

We can also clearly see that the rotation itself is not the issue, it is the frame interpolation.
In the animation we see that the Euler interpolation adds unnecessary rotation, where as the quaternion based Spherical Linear Interpolation (Slerp) does not.