[ODE] Iterative solution

Gary R. Van Sickle g.r.vansickle at worldnet.att.net
Sun Mar 16 12:39:01 2003


> david@csworkbench.com wrote:
> > I've gotten to a decent level of functionality with the algorithm in
> > place.
>
> Very cool.
>

I second that emotion!

>  > Right now, I'm running at 5 iterations and simulating everything
> > believably.  The iterated algorithm is actually a bit slower (due to the 5
> > iterations) in the common case where you have lots of small islands of
> > bodies....
>
> That's interesting.  Perhaps the number of iterations for an
> island should be related to the log of the number of bodies
> in the island (I'm not sure mathematically how the worst-case
> rate of convergance relates to the number of bodies, logarithmic
> is just a guess).

I don't see why you have to or even want to keep the island idea.  Well I
suppose for collision detection it's probably still useful, but for doing the
solving, each constraint is treated as its own "island" by definition (i.e.,
you're dealing with it in isolation, without regarding any other constraints).

[snip]

> > Another thing that's probably slowing it down a good bit is the fact that
> > collision detection has to be run before every iteration.
>
> Does it really though?  I can't see why you should need to re-run
> the collision detection every iteration -- your simulation steps
> are 1/5 as long and run 5x as often, but the chances of an object
> moving through another incorrectly don't seem changed.
>
> Actually, altering your constraints while iteratively solving those
> constraints potentially invites non-convergance.
>
> I think the temptation is to re-collide every iteration to
> re-evaluate penetration depths and spot new colliders, but I
> don't see why at least the latter shouldn't really wait until
> the simulation is smoothed out.
>

Right.  You're not trying to solve for *new* constraints.  You're assuming on
entry to the solver that you've determined the constraints (including collision)
already, and then determining the object configuration that best meets those
constraints.

--
Gary R. Van Sickle
Brewer.  Patriot.