[Haskell-cafe] Yampa integral function
jerzy.karczmarczuk at unicaen.fr
Wed Apr 17 01:48:58 CEST 2013
Le 17/04/2013 00:36, felipe zapata a écrit :
> I'm trying to write some simulator of
> physical systems using Yampa.
> The fundamental idea is to integrate
> the position and velocity, using
> the following algorithm:
> ... ...
Nothing to do with Haskell.
Where do you get this factor 0.5 in your formula: v = v0 + integral (
0.5 * force * recip mass) ?
With constant acceleration v=v0+a*Dt => 1.01, not 1.05
What is that: let x = x0 + vdt2 ??
Again, a constant acceleration movement gives : x = x0 + v0*Dt + a*Dt^2/2.
Yampa or not Yampa, I suspect that your implementation of physics is
In general, even correcting all, you might have reasonable results in
some trivial cases, but in general the extrapolating Euler schema is
unstable, produces growing errors (e. g. in the oscillating case).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe