The Lorenz Attractor

The Lorenz Attractor

This is my effort to display Edward Lorenz’s equations. First I would like to thank a couple of sources. One is the matrix manipulation code designed by Sun Microsystems (now Oracle Corporation). The version I used here is Matrix3D.java, version 1.4 with the date of 98/03/18. Sun’s license allows one to modify and use the code as long as their copyright comment is maintained. The version here is converted to a JavaScript object (but I kept their comment). The other source is the display of the axes in the lower left corner. I got that idea from an old NASA java applet that displayed the Solar System. They used the same Sun Matrix3D code to perform rotations. You can rotate the display with a left-click of your mouse while moving the mouse across the image.

Lorenz’s system/equations are:

\( \frac{dx}{dt}=\sigma \cdot \left( y-x \right)\),

\( \frac{dy}{dt}=x\cdot \left( \rho -z \right)-y\),

\( \frac{dz}{dt}=x\cdot y-\beta \cdot z\).

The x-z term in the second expression and the x-y term in the third expression make this set nonlinear. Not all values of the constants lead to chaos. I’m using Lorenz’s values that make this system chaotic. Those values are ρ = 28, σ = 10, and β = 8/3; which are the standard ones used for this system.

The time increment (Δt) is set to 0.01 seconds. It could (or should) be smaller, but then the iterations are less dramatic and much less interesting.

I change the ploting color after 2,000 iterations for each x-y-z triplet. The colors go from blue to red to green to yellow to black to orange to purple to deep pink and finally to lime. At that point I reset and start over again.

The starting values for this plot are x = 5, y = 0, and z = 0. The sensitivity of chaotic systems to the initial values would be apparent if I used a different set of values–even if those values varied by a tiny amount.

The center of rotation is not at the origin. If it was, then the image would rotate out of view. To keep the center of rotation where things are interesting, the image has been translated -0.5 along the x-axis, -0.5 along the y-axis, and -24.9 along the z-axis. I obtained those values by averaging the x, y, and z increments over time. You will see that the center of the so-called Lorenz butterfly remains stationary during rotations.

This entry was posted in Math, Science, Software. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *