Skip to main content
⠀⢀⣤⣤⣤⣤⣀ ⠀⠀⢸⣿⣿⣿⣿⣿⣷⡀ ⠀⠀⠘⠉⠉⠙⣿⣿⣿⣷ ⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣧ ⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣆ ⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⡀ ⠀⠀⠀⠀⣴⣿⣿⣿⠟⣿⣿⣿⣷ ⠀⠀⠀⣰⣿⣿⣿⡏⠀⠸⣿⣿⣿⣇ ⠀⠀⢠⣿⣿⣿⡟⠀⠀⠀⢻⣿⣿⣿⡆ ⠀⢠⣿⣿⣿⡿⠀⠀⠀⠀⠀⢿⣿⣿⣿⣿⡇ ⢀⣾⣿⣿⣿⠁⠀⠀⠀⠀⠀⠈⠿⣿⣿⣿⡇
Background image

Lorenz Strange Attractor

In this project I explore the Lorenz Strange Attractor in 3D using ThreeJS. The Lorenz Attractor is a dynamical system that exhibits chaotic behavior and is named after Edward Lorenz who discovered it in 1963 while studying weather patterns.

Open demo
  • Math Visualization
  • Research
  • ThreeJS
  • JavaScript
Lorenz Strange Attractor

The Equations Behind the Attractor

The Lorenz Attractor formula is a set of three ordinary differential equations. These equations define the rate of change of a point in a three-dimensional space. The equations are as follows:

dxdt=σ(yx),dydt=x(ρz)y,dzdt=xyβz.\begin{align} \frac{\mathrm{d}x}{\mathrm{d}t} &= \sigma (y - x), \\[6pt] \frac{\mathrm{d}y}{\mathrm{d}t} &= x (\rho - z) - y, \\[6pt] \frac{\mathrm{d}z}{\mathrm{d}t} &= x y - \beta z. \end{align}

Or in a more programatic way:

xn+1=σ(ynxn),yn+1=xn(ρzn)yn,zn+1=xnynβzn.\begin{align} x_{_n + 1} &= \sigma (y_n - x_n), \\[6pt] y_{_n + 1} &= x_n (\rho - z_n) - y_n, \\[6pt] z_{_n + 1} &= x_n y_n - \beta z_n. \end{align}

Where

xx
,
yy
, and
zz
describe the system's state at time
tt
(or at step
nn
). The paramenters
σ\sigma
,
ρ\rho
, and
β\beta
control the dynamics of the system. A simple analogy for each of these parameters is:

  • σ\sigma
    : The Prandtl number, think of it as comparing how fast a pot of water heats up (heat transfer) to how quickly you stir the water (fluid flow)
  • ρ\rho
    : The Rayleigh number, imagine you're heating water from the bottom. A higher temperature difference between the bottom and top makes the water start to boil and circulate faster.
  • β\beta
    : The geometric factor, consider trying to stir honey versus water. Honey, being thicker, resists movement more. That resistance is captured by this parameter.

In Lorenz original paper, the values were chosen as:

σ=10, ρ=28, β=83\sigma = 10, \space \rho = 28, \space \beta = \frac{8}{3}
Although these values have no particular reason besides being around the center of many other values that also produce other interesting shapes.

These values produce the iconic butterfly shape that characterizes the dynamical system. This is what makes the Lorenz Attractor truly fascinating is its shape: Nobody would expect such shape to come out of such simple equations.

Closing Thoughts

For me, the Lorenz attractor is a perfect example of how something that seems so chaotic can still have an underlying sense of order. It’s fascinating to think that tiny shifts in initial conditions can spiral into entirely different outcomes, yet still, everything remains bound by the same set of rules. This blend of unpredictability and structure really hits home—it's a reminder that what looks random on the surface often has more depth to it.