Last week I was in Djerba, an island in Tunisia known for its holiday resort facilities and decorative palm trees that produce dates only camels can eat, among many other things. But hey, no this article is not about Tunisia! It’s a new story of particle art, and it’s an attempt at sharing insights into a creative process.

Djerba Sunset Phoenix


After a previous Tunisian “creative trip” during which 95% of my time ended up being spent on just traveling, this time I wanted to experience a nomad working routine with as few obligations as possible. This way I could focus on key tasks, while still being able to deal with project demands from France.

Well, things did not go as planned, as the day I landed both my phone and laptop wifi card unexpectedly crashed. Somehow I got my phone back in business after a day of shamanic Android tricks, but my laptop remained internetless.
Dealing with emails and on the phone is a pain, handling documents unthinkable. So, I had to postpone stuff and book the earliest plane ticket back. Yay!



I took a day to explore the open-air Djerbahood museum, located in a small village. In 2014, more than a hundred street artists were gathered here to express their form of art.

On a friend recommendation, I had a tour guided by a local kid, who was very kind.

After that I grabbed the official plan and had my own solo super-slow wanderer experience of all of Djerbahood, the kind I’m starting to like more and more.

At the northernmost edge of Djerbahood zone, you can set foot in abandoned ruins that used to be slaughterhouses. I will just shoot a few words about the feeling in there: post-apocalyptic, rubbish, horror, colors.

Walking along each artwork pointed on my map and getting some inspiration here and there, I was particularly struck by a minority of pieces.

Chaos functions

That night, artist friend Sioegroub (Alex Bourgeois) told me about chaos equations. CodeParade proposed the word and made a great video about it.

The way those patterns are generated is really different from the physical way of playing with particles on a canvas.
Instead of resorting to Newton’s Second Law of Motion, with acceleration and forces, the approach is more geometrical, kinda like the way fractal patterns are built, or parametric equations. In the video an example in given:

x' = -y^2 - t^2 + tx \newline y' = yt + xy

This means you can have particle leaps. This also means the systems are very chaotic, and indeed when giving it a shot myself I had a hell of a trouble finding equations that ensure system stability! Or maybe I’m not doing things right.

So… I thought I could apply my own simple chaos functions to speed instead of position. I would thus benefit from intrinsic continuity.

t = sin(stepCount / 50) \newline xSpeed = y - t^2 \newline ySpeed = t - x + yxt

Some interesting patterns started to emerge. Time to work on colors.

Masters of lights

I recently had a highly enriching debate with a lady named Ary (anonymized).

Abstract: “All great painters have an outstanding mastery of light in their work.”

Hm. Apprentice-me wants to know more about that.

I remembered that back in October I accidentally watched a film on Arte about the painter J. M. W. Turner. The film is Mr. Turner, by Mike Leigh.

What struck me most in that film was the camera angles. In several scenes, you get to see some action only in a corner of the screen space, while all the remaining view makes a vibrant framed painting. Also, many scenes were filmed at sunrise or sunset. Stunning.

How could I have a go at another way of using light? My particle systems live in a 2D world where I sometimes simulate a third dimension, but they never go through the graphics rendering pipeline you can get in 3D creation software. This constraint is part of my personal touch, I believe, but maybe I can try something.

The concept of particle directional lighting

Little by little, I came up with a new technique.

Scaffolding an angle-dependent color, I started with simple laws.

hue = 200 + speedAngle , where speedAngle is the direction of the speed vector of a particle
Note: I use the HSL color space for all my artworks, I believe it is a most natural way of manipulating and thinking about color. Love it, even wrote a thesis about it a few years ago, haha.

A few steps later, the law became more like this:

speedLightFactor = (\frac{ 1 + cos(2 \cdot (speedAngle + incomingLightAngle)) }{2})^5 \newline lightness_{(\%)} = 10 + 60 \cdot speedLightFactor

In a nutshell, with this type of equation you can choose which strokes will be lit based on their orientation, and how discriminative this choice is by adjusting the exponent. speedLightFactor will always be between 0 and 1 so you are free to scale it differently everywhere you need it.

Some more research enabled me to apply this SLF (Speed Light Factor, oh look an acronym lol) to:

  • Hue
  • Saturation
  • Lightness
  • Particle size

The last one is the most interesting. SLF on a stroke thickness will give a feeling of 3D to a rotating particle on a plane, as though it were a ribbon, and with all those coupled parameters you can aim at the right adjustments.

See the Pen Browniandrix noise L8 by Alex Andrix on CodePen 1

So that’s a trick for a somewhat 3D feeling, or calligraphy.
There is probably much more room for improving the SLF equation.

Djerba Sunset Phoenix

Some steps

A different code base than the previous snippet was used to create the artwork. Our chaos equation is still the following:

t = sin(stepCount / 50) \newline xSpeed = y - t^2 \newline ySpeed = t - x + yxt

Final artwork

Djerba Sunset Phoenix


In some creation processes there is a long and deep preparation phase, during which you seed as many thought-through elements as you can to start with a quite neat idea in your imagination – albeit largely transformed in most cases.

This artwork though, is more of a spontaneous happening driven by experiences, encounters with people around me and continuous artistic thinking.

I have explored new ways of playing with particles behaviour and colors, and I will definitely keep using them!

I am working on an article about a second artwork made in Djerba. Should be out soon!

Alright, this short story ends.
Thanks for reading!


Amine Metani
Kiddo guide
Lucie Curé