Lorenz Strange Attractor
In this project, I explore the Lorenz Strange Attractor in 3D using ThreeJS. The Lorenz Attractor is a dynamical system known for chaotic behavior, first discovered by Edward Lorenz in 1963 while studying weather patterns.
Open demoThe Equations Behind the Attractor
The Lorenz Attractor comes from a set of three equations created by Edward Lorenz in 1963. He was trying to simplify how air moves in the atmosphere, specifically how warm and cool air form circular convection currents. What is surprising is that even though these equations are short, they can behave in very unpredictable ways. Here are the original equations:
These equations describe how three values
To simulate the system on a computer, we do not solve everything in one shot. Instead, we move through time in small steps and update the values repeatedly. This process is called numerical integration. One simple way to do it is to rewrite the equations like this:
Whether we use the continuous version or the step-by-step one, the idea is the same. The variables
- (sigma) controls how fast the air moves compared to how fast heat spreads. It's like comparing how quickly water stirs versus how quickly it heats up.
- (rho) relates to how strongly the system is heated. When this value gets big enough, things become unstable and interesting patterns emerge.
- (beta) is a damping factor. It determines how quickly motion dies down, kind of like how thick honey resists movement more than water.
In his original paper, called Deterministic Nonperiodic Flow, Lorenz used:
If you run the simulation using those values, the path traced out in 3D looks like a pair of wings. This is the famous "butterfly" shape that gave rise to the phrase "the butterfly effect." The pattern never repeats exactly, even if you let it run for a very long time. At the same time, it does not shoot off to infinity. It stays within a bounded shape. That is what we call a "strange attractor": the motion is confined to a shape, but what happens inside that shape remains endlessly complex.
The Demo
I built this demo so you can experiment with the Lorenz system directly in your browser. Try changing the parameters and initial values, then watch how the trajectory shifts. It is the fastest way to get an intuitive feel for how sensitive and beautiful this system can be.
Closing Thoughts
The Lorenz Attractor is a classic example of how simple equations can produce complex behavior. You do not need randomness to get unpredictability, and that is what makes it so fascinating. It has inspired countless studies in chaos theory, weather prediction, and even philosophy. I hope this demo helps you see the beauty hidden in those equations and sparks your curiosity to explore more about dynamical systems and chaos theory.

