Colour Schemes

Introduction

There are three variables that can be used to select the type of pattern drawn and how it is coloured

When using MandelbrotDriver.py the pattern type and colouring algorithm are specified using the '−t' parameter.

The palette is selected using '−d'.

Pattern Type

The pattern type can be either 'Mandelbrot' (−tM) or 'Julia Set' (−tJ). The following examples show the current colouring algorithms and palettes for the Mandelbrot set.

Colouring Algorithm

There are six colouring algorithms (Standard, Stars, Bands, Real Bands, Imaginary Bands) and Quadrants. Standard is the default, the others are selected by appending one of the letters ('S', 'B', 'R', 'I' or 'Q') onto the −tM parameter (eg. −tMS will draw a Mandelbrot using the stars algorithm).

The following table shows examples of these combined with the eight currently available palettes (selected using the −d parameter).

-d<n> Standard (-tM) Stars (-tMS) Bands (-tMB)
1
2
3
4
5
6
7
8
-d<n> Standard (-tMI) Stars (-tMR) Bands (-tMQ)
1
2
3
4
5
6
7
8

They are generated using commands of the form

python mandelbrotdriver.py -tMB -c(-1.405,0.016) -fcs3b -m80 -s240x180 -d3

(this particular example uses the 'bands' algorithm and colour scheme 3).

The palettes have been constructed with the intention that 1 and 2 would be used for the standard algorithm, 3 for the stars and 4 and 5 for the three types of band, but as can be seen above interesting effects can be obtained for other permutations.

'Stars' Colouring Algorithm

The stars colouring algorithm iterates the same equation as the standard scheme, but it also records the values of |Z| during the iteration. The smallest |Z| value encountered is used to decide the colour. This generates a pattern where the mini-mandelbrots that are found throughout the set appear to be surrounded by glowing halos as can be seen in the next image.

Here are a couple of frames taken from an animation. The are separated by a zoom factor of 26 (64) and have 'blob' factors of 0.001 and 0.0001.

 

There is a stars animation on the animations page. In some circumstances the stars algorithm is much better at highlighting the structure as can be see in these next two images. (The commands to generate them are displayed alongside.)

Standard

python mandelbrotdriver.py -tM -i32000 -c(-1.747586,0.00345198) -z(0,0.26480) -s640x480 -fw21 -m120000 

Stars

python mandelbrotdriver.py -tMS -i3200 -c(-1.747586,0.00345198) -z(0,0.26480) -s640x480 -fw21s -m120000 -b0.00005

'Bands' Colouring Algorithm

In the bands colouring algorithm, instead of calculating the smallest value of |Z| encountered during the iteration we monitor the real and imaginary parts independently, finding the smallest values of |r| and |i|. We then calculate a colour based on the combination of the two. Palettes 4 and 5 arrange the colours to emphasise the bands. The next image corresponds to the ones in the stars section, the remaining two further illustrate the bands algorithm.

python mandelbrotdriver.py -tMB -i3200 -c(-1.747586,0.00345198) -z(0,0.26480) -s640x480 -fw21b -m120000 -b0.00005

 

python mandelbrotdriver.py -tMB -s1024x800 -fb2

python mandelbrotdriver.py -tMB -c(-0.075,1.01) -m10 -s1024x800 -fb1

Imaginary and Real Bands

The colouring scheme used to generate the bands pattern can be split into two separate components, showing the contribution from the reall and the imaginary elements. "-tMI" will draw the imaginary part and "-tMR" the real part ("-tJI" and "-tJR" for the Julia sets). This separation can be seen in the following three images, reproduced from the colour schemes table above.

Bands (-tMB) Real Bands (-tMR) Imaginary (-tMI)

Qudrants Colouring Scheme Bands


Click to enlarge.
I call this Quadrants as when I first thought of it I only had 4 colours, one for each quadrant ot the complex plane. But since then I have expanded it to include 255 colours. In this scheme you keep iterating z until you reach a point (x+iy) that has a modulus greater than 2 (x2 + y2 >  4). You then calculate the arc tangent of y∕x and use that as an index into the colour map. The result is an image like the one on the left.
Visits since July 2008