I’ve always been fascinated by fractals and strange attractors. One of the most famous strange attractor system is the Lorenz system. But with some trial and error, you can find some formulas that create “chaos”. In this post, I used a system of equations, described in the book “Chaos In Wondeland” by Cliff Pickover.

As a teaser, I start with a creation I made and like the most, the “Zeppelin”.

Zeppelin

Run Full Screen

The 2D system of equations is written as:

\[
\begin{eqnarray}
x_{t+1} &=& \sin(y_t b)+c \sin(x_t b),\\
y_{t+1} &=& \sin(x_t a)+d \sin(y_t a)
\end{eqnarray}
\]

where
\[
\begin{equation}
-\pi \le a,b \le \pi
\end{equation}
\]
and
\[
\begin{equation}
-\frac{1}{2} \le c,d \le \frac{3}{2}
\end{equation}
\]

Choosing the right parameters is the true art. By picking them carefully, you can get very beautiful drawings. In my implementation, I chose to render the output as if an artist draws them by hand with a HB pencil. Per frame update, 1 million points are drawn. The soft and curly drawings somehow remind me of the drawings of Leonardo DaVinci.

You can run the application yourself by clicking on one of the images. In the application, you can use the following keys:

  • 0-9: Some nice pre-set drawings
  • s: Save your current drawing as png
  • [mouse click]: Create a new drawing

If nothing seem to happen after 30 seconds, it usually means that the drawing stays in a few (almost invisible) pixels. Just mouse-click again for a new set of parameters. Below I’ve included some of my favourite outputs.

Two horns
a = -2.9852341064579693, b = -2.8277928644704167, c = 0.022656379993632125, d = 0.7363686635262385.
Enveloppe
Propellor
Propellor
Two Flowers
Two Flowers