[ODE] Euler vs. Runge-Kutta and adaptive step sizes
Martin C. Martin
martin at metahuman.org
Wed May 1 21:16:02 2002
Russ Smith wrote:
>
> > One problem I'm having is when things interpenetrate. One thought I'm
> > having is to stick with a fixed step size, but at the end of a step,
> > if a new constraint is introduced, redo the step with the new
> > constraint.
>
> it seems like you might have the opposite problem if you do this, i.e.
> that bodies might take a long time to actually touch each other.
Well, if I set the ERP for the contact joint to 1, I think it'll be
fine.
In other words, imagine that two objects actually interpenetrate, by 5
units. If the ERP is 0.2, then the constraint says "their relative
velocity must be such that they actually move 1 unit in 1 timestep, in
the direction that separates them."
If, however, they're 5 units apart, and without a constraint they would
interpenetrate next timestep, then I'm proposing adding a constraint
that says "their relative velocity can't be more than 5 units per
timestep in the direction that brings them closer together."
Does that make sense? What do people think?
Is this similar to some standard technique? Have people tried it
before?
Thanks,
Martin