From: Ethan Glasser-C. <gl...@cs...> - 2010-09-26 19:34:05
|
On 08/08/2010 08:47 AM, Roland Everaert wrote: > Hello, > > I am currently testing the pyode library with pygame and pyOpenGL and I > am quite surprised that the behavior of the tutorial 1 code is not the > same if dt differ from 0.04. > > Why when dt is greater than 0.04 the body goes higher and why is it go > lower if smaller than 0.04. Or in other word, why the step() method > influence the computation of the position like the gravity is higher > with small step and lower when step are big? > I believe this is an artifact of how forces are applied. If you replace the call to body.addForce with one to body.setLinearVel, the two simulations behave "identically" (every fourth step when dv=0.01 is exactly the same as the corresponding step when dv=0.04). I do not know why applying the force should count "more" if dv is larger, but I don't think it's a pyode issue. In case you haven't already, you might consider asking on vanilla ODE mailing lists/fora. Ethan |