animation - Can a quaternion represent more than 360 degrees of rotation? -


i euler rotation based on degrees can keyframe animation of large number of degrees, 1000, , multiple full 360-degree revolutions on object purposes of setting spinning, etc.

however i'm @ point when working on involved lot of consecutive animations among 2 different axes think i'm seeing effects of gimbal lock. when perform 1 of chained animations, object keeps flipping 180 degrees after completes 90-degree rotation. sound gimbal lock? happens after other prior , successful rotations along different axes.

in case, tried switching quaternions appears quaternions aren't suited spinning effect, since orientation , treat multiple of 360 0 using this:

template <typename t>  inline quaterniont<t>  quaterniont<t>::createfromaxisangle(const vector3<t>& axis, float radians)  { quaterniont<t> q; q.w = std::cos(radians / 2); q.x = q.y = q.z = std::sin(radians / 2); q.x *= axis.x; q.y *= axis.y; q.z *= axis.z; return q; } 

is possible more 360 degrees of rotation quaternion technique?

your situation not sound gimbal lock. gimbal lock when can no longer rotate in other direction 1 since axes aligned on top of each other*. sounds more cross product do. anyway shouldn't have problems since have 2 axes going on long choose suitable rotation order there should no problem gimbal lock whatsoever.

the reasons quats work represent uniformly rotation space , space has no excess values. can key every 180 90 degrees , quats work right. not interpolate same way doing now. in fact can not rotate on many axes @ once there 1 rotation going on rotating may euler angles simultaneously keep turning secondary rotation direction time. 1 way split animation uniformly , interpolate quats calculating keyframe positions eulers. way encode rotation cycles in length of quat.

in case result wont same, since wouldn't euler wobble.

* can visualize drawing rings @ each axis orientation instead   of object , see how move overlap (like gimbal hence name). 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -