Animation with WebGL and Three.js (3)

stable

Please click the image for real-time animation.

The parameters are:

Ibody.set(1,0,0, 0,1,0, 0,0,2);
L.set(2.0*Math.PI*0.0,2.0*Math.PI*0.0,2.0*Math.PI*5.0);
var dt = 1.0/1000.0;

So the body should rotate 2.5 times per second, and this is what is happening in the simulation. The graph shows the components of the unit quaternion, which rotates only 1.25 times per second.

euler

In the real-time animation, the body rotates rather slowly, but it is because the frame rate is only 30fps.