Lab ·

Lorenz Attractor in WebGL

A WebGL visualization of the Lorenz Attractor, demonstrating chaos theory and the butterfly effect in action.

The Lorenz Attractor is a fascinating mathematical concept that helps us understand chaos in nature. It was discovered by Edward Lorenz, a mathematician and meteorologist, while he was studying weather patterns. What makes it special is that it shows how small changes can lead to dramatically different outcomes - a concept we now know as the "butterfly effect."

Think of it like this: imagine you're trying to predict the weather. Even if you have a perfect mathematical model, tiny differences in your starting conditions (like a butterfly flapping its wings) can completely change the outcome. This is why long-term weather forecasting is so challenging - the atmosphere is a chaotic system where small changes can snowball into major differences.

The Lorenz Attractor creates a beautiful, butterfly-like pattern when visualized in 3D space. This pattern isn't random - it's actually following very precise mathematical rules. But because of its chaotic nature, it never repeats exactly the same way twice. This makes it a perfect example of how something can be both completely determined by mathematical rules and yet still be unpredictable in practice.

There's a fault in the demo somewhere, if you let it run for a while the fps goes down to 10 😶.

Thanks to Daniel Shiffman for the inspiration.

Demo: Lorenz Attractor Github: JoostKiens/lorenz-attractor