Euler angles rotation represantation

Started by
5 comments, last by ongamex92 8 years ago

If a rotation matrix is encoded in euler angles of axis rotations, are two of such representations (a,b,c) and (d,e,f) possible to correctly slerp into each other by simple lerp of the respective angles into each other?

Advertisement

May work satisfactionary for special cases, but it's no good idea in general.

Even if you don't need a rotation along the shortest arc, what's about lerping between angles of -350 and 10 degrees?

Should it be -170, 360 or zero?

Convert to quat and slerp (or lerp) to avoid headaches if possible (although animation software will lerp the eulers directly to follow user edited curves).

Even if you don't need a rotation along the shortest arc, what's about lerping between angles of -350 and 10 degrees?

Should it be -170, 360 or zero?

I do not want to encode PI+ arbitrary rotation events, as this is not what rotated space is able to provide even with quaternions, my question stands in tact I gess.

Like JoeJ said, if you want to interpolate between to rotations I would convert them to a quaternion and do a slerp between them. You could even skip the rotation matrix and go straight from Euler angles to quaternions.

If you lerp the Euler inputs your rotation may not take the most direct path. A simple example is lerping between 10 degress and 350 degrees. Instead of rotation 20 degrees it will rotate 340 in the other direction.

Another simple example is if you have an airplane pointed upwards at 45 degrees. Now suppose you have a rocket also nearly pointed up at 45 degrees but rotated 180 degrees around the vertical axis. If you lerped the Euler angles from the plane to the rocket it would rotate 180 degrees around the vertical instead of rotating 90 degrees by continuing to pitch upward. This may be the desired lerping behavior if you were rotating a gun turret, for example. However, in most cases, the properties of a quaternion slerp are much nicer.
My current game project Platform RPG


I do not want to encode PI+ arbitrary rotation events

What do you want to do? Where is your data coming from?

Character animation is the only example whre it would make sense, because a 10 -> 350 degree rotation can not happen due to joint limits.

You would need to make sure using the same rotation order as the animation package.


A simple example is lerping between 10 degress and 350 degrees. Instead of rotation 20 degrees it will rotate 340 in the other direction.
A simple example is lerping between 10 degress and 350 degrees.

You cannot tell that it was not the actual rotation, just becouse it was not shortest, but as I said, I will never interpolate more than PI.

"(a,b,c) and (d,e,f) possible to correctly slerp into each other"

A qustion here, if both represent the same rotation why would you lerp between them?

Everytime I see "Euler angles" my blood freezes, because it's such a pain to do any calculations with them. Additionally the 99% of the internet doesn't know that there is a difference between extrinisic and intrinisic euler angles...

This topic is closed to new replies.

Advertisement