---
title: "The Lorenz Mod 2 Attractor · generative art"
description: "The Lorenz Attractor, a Paradigm for Chaos. Generative art plate #7 by Theodore Vorillas, drawn live in your browser from its equations."
url: "https://vorillaz.com/lab/lorenz-mod-2-attractor"
---

![](https://vorillaz.com/_astro/lorenz-mod-2-attractor.DXax743V_2fTRvt.webp)

fig. #07 · rendered live in your browser from the equations below

# #07 the lorenz mod 2 attractor

The Lorenz Attractor, a Paradigm for Chaos.

- date

  2019.04.14

- tags

  generative-art · javascript

- fork

  [codepen ↗](https://codepen.io/TheodoreVorillas/pen/LvzEmb)

The Lorenz system is a system of ordinary differential equations first studied by Edward Lorenz. It is notable for having chaotic solutions for certain parameter values and initial conditions. In particular, the Lorenz attractor is a set of chaotic solutions of the Lorenz system which, when plotted, resemble a butterfly or figure eight. [#1](#ref1)

## The algorithm

```javascript title="lorenz-mod-2.js"
const a = 0.9;
const b = 5.0;
const c = 9.9;
const d = 1.0;

const next = (x,y,z) => {
  const dx = -a * x + y * y - z * z + a * c;
  const dy = x * (y - b * z) + d;
  const dz = -z + x * (b * y + z);
  return {dx,dy,dz};
};
```

## References

- [Lorenz system](https://en.wikipedia.org/wiki/Lorenz_system)
- [The Lorenz Attractor, a Paradigm for Chaos](http://perso.ens-lyon.fr/ghys/articles/lorenzparadigm-english.pdf)
