The Lorenz Attractor


Here's a plot produced by our lorenz program, with the viewing angle β = 0 and the Rayleigh parameter r = 25. The x-axis is horizontal; the z-axis is vertical. For this plot, y = 0.

Note that this plot is initiated near x = 2.5, y = 0, z = 0.5; the subsequent trajectory of the plot is very sensitive to this initial position. For example, the sign of x reverses at unpredictable times.

The first three equations in the white panel are those displayed by Lorenz in his famous paper. See Eqs. 25-27 on this paper's sixth page.

The lower three equations, which are those used in our program, are equivalent to Lorenz's original equations, but with the variables x, y and z simply scaled to ensure that the size of the plot does not grow or shrink when the Rayleigh parameter r is increased or decreased.

A tar file containing the source code for the lorenz program is available here. It is designed to be compiled and run primarily on Linux machines, for which the xterm terminal is available. (The lorenz program must be run from an xterm.) It may also be compiled and run on Windows machines, where it requires the installation of three Cygwin packages—not difficult. Detailed instructions are included with the source code.


The program, which I first wrote many years ago as an exercise, is designed to be educational in that it allows for considerable user interaction. One may increase or decrease the Rayleigh Number, or change the viewing angle of the three-dimensional attractor, or select an initial point for the plotting of the attractor, all while the plotting is taking place. It's not a large program, and easy to compile and run.