SV: [ODE] Iterative solution

Martin C. Martin martin at metahuman.org
Wed Mar 19 17:25:01 2003


david@csworkbench.com wrote:
> 
> For that matter, how would you know that the bottom box had moved into the
> box above it, short of running collision detection every iteration,

Look.  The current position and velocity (pos_now and vel_now) are given,
along with delta_t.

What we want to figure out are the force & velocity over the timestep and
the position at the next timestep.  However, these things are related:

vel_next = vel_now + force / mass * delta_t
pos_next = pos_now + vel_next * delta_t

So, changing the velocity (that's applied over the timestep) is equivalent
to changing the position (at the end of the timestep) and vice versa.  If
delta_t is 0.1, and the position now is -1, then saying "the new position
needs to be >= 0" is the same as saying "the velocity needs to be >= 10." 
One is just a different way of saying the other.  Same with force.  Which
one the computer represents and works with is an implementation issue. 
Just because the computer represents velocity doesn't mean you can't think
in terms of position or force or acceleration.

- Martin