From: Gary <pa...@in...> - 2005-06-22 17:53:57
|
I've been wondering if there would be a programming, accuracy, or performance benefit to using a fancy ode solver with vpython rather than the canonical v = v + F/m * dt especially as the number of objects grows. My thinking was that I could call the solver once per "frame" (say, 1/30 sec), solve for all of the variables all at once, and perhaps have better accuracy, and perhaps get more objects into the simulation. I began to experiment with scipy's odeint, and got some demos working. I ran across some instabilites that I tracked down, but before going any further I thought I'd ask: Does this seem worth the effort? Is there something I haven't considered that dooms this idea? Has someone already done this? The instablilty I found is related to in the way odeint (LSODA??) manages the independent variable. I'd like to look at other solvers. Any suggestions? In particular I'd like to look at a 4th order Runge-Kutta solver, but the only RK4s that I've found are written in python. Does anyone know where there's a python-wrapped C or Fortran RK solver? Thanks, Gary |