[ODE] More accuracy ???

Adam D. Moss aspirin at ntlworld.com
Sun May 25 05:07:02 2003


Nguyen Binh wrote:
>     So, the code is modified to
> 
>     ------Begin code fragment
>     ......
>         // handle linear velocity
>         dReal h2 = h*h/2;
>         for (j = 0; j < 3; j++)
>                 b->pos[j] += h * b->lvel[j] + h2*b->facc[j];
>     .....
>     ------End
>     So our ODE has O(h3) accuracy compare to just O(h2) with the old
>     one.

I've given it a try-out and it doesn't seem to hurt matters at all,
though it's hard to say that it helps, and I'm not qualified to speak
of its correctness.  I find that rotational velocity is much less
stable (I don't know about 'accurate', though the issues are
probably related) than linear velocity -- is there a similar trick
for rotational velocity?

Regards,
--Adam
-- 
Adam D. Moss   . ,,^^   adam@gimp.org   http://www.foxbox.org/   co:3
Bereaved relatives are not amused
As on their dear departed I feverishly consume