[ODE] box-box performance

Chris Campbell chris.campbell at l8tech.com
Wed Nov 27 00:23:02 2002

Like Daniel says you might find that for example as a rolling box 
(dice maybe?) comes to a stop, it might teeter on one edge for 
a second before deciding which face it will eventually fall onto. 
At that point the kinetic energy would be near to zero. Also 
consider if you threw a body straight up. At some point it will
have near zero kinetic energy, then start coming down. 
With an extremely small epsilon it might work out most of the 
time but I think it's safer to judge by distance travelled/over a 
few consecutive time steps.


> > there are situation where for example a box can stay on an edge. To
> > avoid this you have to take time in concideration.
> Instead of time, could this take "stability" into account instead?
> e.g. something like this:
> if(
>       (body.KineticEnergy() < epsilon) // i.e. velocity ~= 0
>       && 
> (body.PotentialEnergyRelativeTo(body_it_is_contacting) < epsilon)
>           // i.e. it isn't going to change on us on its own.
>   )
> {
>   // "Freeze" body until something hits it etc.
>   // ...
> }
> Seems to me that this would be pretty much foolproof, and better yet
> instantaneously-acting; there'd be no need to wait until you 
> were reasonably
> sure the body had "really" stopped moving, you could lock the 
> body down as soon
> as these conditions became true and know you were doing the 
> right thing.  Or is
> there a conceptual or implementational issue here I'm missing?