Can quaternion values 'jump' (as Euler angles)?
Hi,
I'm wondering what is happening to my quaternion if the object is gradually changing orientation in space:
Is it possible for some values (w,x,y or z) suddenly jump as for Euler angles? I mean if my object is changing its orientation very slowly can we suddenly see x go from -1 to +1? or that kind of thing? Are all values continuous functions of time (if we take a real object)?
I would say yes (no jump) but I'd like to hear it from someone who knows better (Minorlogic?)
Thanks
[edited by - Floating on August 8, 2003 4:30:43 AM]
GameDev.net - The Matrix and Quaternions FAQ
There''s a few more documents on quaternions in the Maths and Physics section of GameDev.net.
Never noticed Euler angles to jump? Maybe you mean gimbal lock?
There''s a few more documents on quaternions in the Maths and Physics section of GameDev.net.
Never noticed Euler angles to jump? Maybe you mean gimbal lock?
Usually there are no jumps. The formula relating the angular velocity to the quaternion is
dq/dt = 0.5 * w * q
where q is the rotation quaternion and w the angular velocity. This can be written as
dq = 0.5 * w * q * dt
where ''dq'' is the change in the quaternion associated with the time step ''dt''. As long as your time step is small and w is not too large (it''s not spinning ridiculously fast) dq should be small.
The only exception arises when you realise that q and -q represent the same rotation. So you can see sudden jumps from x to -x, y to -y, etc. even with little or no rotation. This will generally not happen if you work only with quatenions using formulas like the one above. But if you convert from matrices or Euler angles then jumps like this can happen even if there rotation is slow and in small steps.
dq/dt = 0.5 * w * q
where q is the rotation quaternion and w the angular velocity. This can be written as
dq = 0.5 * w * q * dt
where ''dq'' is the change in the quaternion associated with the time step ''dt''. As long as your time step is small and w is not too large (it''s not spinning ridiculously fast) dq should be small.
The only exception arises when you realise that q and -q represent the same rotation. So you can see sudden jumps from x to -x, y to -y, etc. even with little or no rotation. This will generally not happen if you work only with quatenions using formulas like the one above. But if you convert from matrices or Euler angles then jumps like this can happen even if there rotation is slow and in small steps.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement