
jerzy.karczmarczuk@info.unicaen.fr wrote:
I appreciated the elegance of overloading, the usage of Num classes, etc, which makes it more readable, although somewhat slower.
The source code has explicit monomorphic types all over it; I would expect GHC to be able to optimise out any method calls. (OTOH, I'm not a GHC expert... Simon? Don?)
For those who don't have patience to execute the program, I converted the ppms to a XVID coded AVI file. Thanks, Andrew http://users.info.unicaen.fr/~karczma/Work/Chaos0.avi
Thanks for that. I did try encoding the video as MPEG 1, but it was still far too large. (20 MB.) Would have taken me several months to upload...
What I didn't appreciate was the use of simple extrapolating Euler's method which for oscillating systems is known to be unstable, so the results of the simulation may be far from the reality. Well, one chaos is worth another one, and the sin is not as mortal as in the case of truly periodic systems, but it may be the cause that it is difficult to see the classical fractal structure of the attraction domains on the generated images.
Fact #1: I don't *know* of any other numerical integration algorithm. (I've heard of RK4, but it's too complicated for me to understand.) Fact #2: I have tried running the simulation with several different, non-comensurate time step values, and it always seems to produce the same output, so I'm reasonably confident there are no integration errors.