[ODE] Four little things

Russ Smith russ at q12.org
Tue Apr 13 21:19:13 MST 2004


> good spotting! yes, my original implementation is wrong - i somehow
> assumed that the center of mass did not change when a sphere was
> chopped into a half-sphere. i verified your change using the matlab
> code below. i'll check this change into CVS shortly.

okay, the fix is checked in. i renamed the variables a,b in that
function to radius,length, to make it clearer what's going on.

everyone should note: if you rely on dMassSetCappedCylinder() to
generate an inertia tensor, then this small adjustment will subtly
change the way that your simulation will evolve. if you care about this
you can simply initialize your inertia tensors directly with the old
values. remember that these dMassXXX() functions are for convenience in
setting up simulations - few real objects perfectly match these ideal
primitives of uniform density.

russ.

-- 
Russell Smith
http://www.q12.org


More information about the ODE mailing list