Drag mouse to rotate model. Hold shift key or use mouse wheel
to zoom it (canvas is matched to the browser window).
α determines point brightness.
Dynamics of N = 1 048 576 independent points is plotted
(animation of 4 million and
16 million particles).
GPU based simulation of the
Lorenz strange attractor.
Equations of the particle motion are
x' = a(y - x),
y' = x(r - z) - y,
z' = xy - bz.
The script uses simple Euler integration scheme. It is funny and fast but not very
accurate (you get different attractors for different dt).
Do we need double precision?
1. Unfortunately we get different attractors for different dt (e.g. for 0.01, 0.02 ...).
2. I failed to reproduce attractor for the Lorenz parameter values (a = 10, b = 8/3, r = 28).
3. We don't see very fine strange (fractal) structure of the Lorenz attractor.
Therefore more accurate 4M simulation with small time step
(it makes 10 iterations per frame), 4M simulation with the second
order Runge-Kutta integration algorithm and
4M simulation with the RK4 algorithm.
Now attractors are similar for different dt but are too blurred ("wrong" animations with
the simple Euler scheme is better :)
It is likely that Float32 precision is not enough for accurate simulations :(
More strange attractors
Rossler strange attractor and
Duffing oscillator.
See also
Computing in WebGL by Felix Woitzel.
Simulations on GPU
updated 23 Oct 2013