Click on the image to see its parameters.

Tutorial: Dynamic Chaos Game Coloring Formula

Text and Images © 2014 Kerry Mitchell

Introduction

This is a coloring formula that is really a fractal formula--it is not intended for use with Mandelbrots or Julias, but rather, combines the fractal calculation with the coloring into one. It is best used with a Pixel fractal formula.

The basis for this is the Chaos Game, often used as introduction to chaos and fractals, and typically used to generate the Sierpinski triangle. Here is a video of it in action.

Background

In the standard chaos game, three anchor points are chosen on a plane. These are the corners of the Sierpinski triangle and are shown as the red, green, and blue dots in the figure below.
To begin, a random point is chosen and drawn. Then, at each iteration, one of the anchor points is chosen randomly. A new point is drawn, halfway between the old point and the chosen anchor point. Repeat a gazillion times to get the triangle, which is the attractor for this process. That's why, no matter what point you choose initially, you'll always get this same picture.

The process is defined by:

In the dynamic chaos game, the anchor points are not fixed, but can rotate around a circle, a superellipse, a rose curve, a Lissajous curve, or slide back and forth along a segment. How fast the anchor points move, the probability of a particular anchor being picked, and how far along the line between the old point and the anchor the new point is, can all be set.

Below are examples showing the Sierpinksi triangle with the anchor points rotating slowly around a circle, the triangle with the anchors rotating fast, and the triangle with the anchor points sliding to and from the center. Click on an image to see its parameters.

Parameters

The parameters are in three groups: curve, anchor point, and general drawing.

Curve Parameters. These determine the curve along which the anchor points move. For the "curve type," choose from "segment," "circle," "superellipse," "rose," and "Lissajous."

Point Parameters Drawing Parameters

Hints

Sample Image

Here’s how to make the image at the top of this page.

  1. Start a new fractal, with these characteristics:

    Your image should look like a white off-center disk with a black hole in the middle and black and yellow bits at the edge.

  2. On the Outside tab, set "curve type" to "lissajous." Set the "x frequency" to 5.05 and the "y frequency" to 2.95. (Having them not be exactly whole numbers gives some interesting curves to the interior of the image.)
  3. Set the "# points" to 2:
  4. Set the "sampling factor" to 50 and the "scaling" to "hyperbolic tangent." Set the "pre-density" to 0.1 and check the "solid background" box.

    This layer should resemble the example image, but grainier. To fix that, let's average together some more layers.

  5. Duplicate this layer three times. Each layer should have the "Normal" merge mode. Change the "initial seed" and "initial z" on each layer so that they're all different.
  6. Set the opacities for the layers like this:

    If you wish to add more layers, set their opacities to 100% ÷ the layer number (so Layer 5 would have an opacity of 20%).

Your image should look like the example. If not, go snag the parameters from the examples page.

Back to Tutorials page
Up to my home page