Hello, there,

Here I am trying to rotate a rigid body in 3D space.

I will only rotate the object without translation, and I want to

rotate the object to all possible configurations in 3D space.

So I tried to use 3 loops with the same "step" for the three euler

angles,i.e., pitch, yaw and roll, but I got a lot of duplicated

rotations.

for(psi = 0; psi < 180; psi += step)

for(theta = 0; theta < 360; theta += step)

for(phi = 0; phi < 360; phi += step)

{

......

I checked this on the web and I think it's called "gimbal lock".Quote:}

So I think I may solve it by using quaternion but failed to find

way out. Does anybody know how to recaculate the given "step" s.t.

we can elimilate these dupicated positions? Or can anybody give me

some hint for references?

Thank you very much!

Macro Zhu