[ODE] exploding spinning objects

J. Perkins starkos at gmail.com
Wed Feb 22 14:35:13 MST 2006


On 2/15/06, Nagymathe Denes <denes at invictus.hu> wrote:
> You can reproduce it quite simply in the text_boxstack (or whichever)
> sample: just create a body somewhere in the air with arbitrary orientation,
> disable gravity for it (dBodySetGravityMode(0)), and give it some non-zero
> angular velocity. It's ang.vel. will continuously increase.

I am not able to reproduce this in the unstable branch. Here's a
simple test framework. What do I have to add to demonstrate the
problem?

 ---

	dWorldID world = dWorldCreate();
	dBodyID body = dBodyCreate(world);
	dBodySetGravityMode(body, 0);

	dMatrix3 rot;
	dMakeRandomMatrix(rot, 3, 3, 1.0f);
	dBodySetRotation(body, rot);

	dVector3 vec;
	dMakeRandomVector (vec, 3, 1.0f);
	dBodySetAngularVel(body, vec[0], vec[1], vec[2]);

	for (int i = 0; i < 5000; ++i)
	{
		const dReal* vel = dBodyGetAngularVel(body);
		printf("%f %f %f\n", vel[0], vel[1], vel[2]);
		dWorldQuickStep(world, 0.01f);
	}

	dWorldDestroy(world);

 ---

Thanks for your help with this,

Jason



More information about the ODE mailing list