Mandelbrot Cellular Automaton

Explanation:

The MCA (Mandelbrot Cellular Automaton) is a combination (in some sense) of
the Mandelbrot set and a Cellular Automaton, such as John Horton
Conway's Game of Life.  

It is different from the Mandelbrot set in that it shows each stage of
the calculation process (as z is replaced by z^2+c), whereas the
standard Mandelbrot set is a record of when the magnitude of an
iterated function exceeds a certain threshold (say 2.0).  That is, the
Mandelbrot set provides information on the non-Life MCA (MCA with
MAND_LIFE set to 0), and is static rather than dynamic.

It is different from the usual Cellular Automaton in that the state of
each cell is a complex number (conceptually).  The usual Cellular
Automaton has states which are integers, mapped to colours for
display, and rules for changing to new colours in the next generation
based on the current colour and linearly on the surrounding colours
(i.e. the neighbourhood).

The MCA (or more generally a Complex Non-linear Cellular
Automaton) has a complex state and a non-linear rule for changing to
the next state.  The magnitude of this state is then mapped to colours
for display purposes.  Optionally (if MAND_LIFE is set to 1) the next
state also depends linearly on the surrounding states.

Usage:
Run "./mca_main" in either Gnome or KDE (it requires the GTK+ library
to run).  Sit back and watch; close the window to stop it.

Options can be changed in the "mca_calc.h" file, followed by
recompilation ("make mca_main" or "make all").  Things to try: 
  * change PERIOD to avoid problems with updating or closing the window;
  * change the window position and size, to say 
     LEFT_X = 0.3, TOP_Y = 0.6, CPLX_HT = 0.1, CPLX_WD = 0.1 (or any
     of your favourite areas from the Mandelbrot set);
  * change the colour scheme, e.g. set RAINBOW = 0 and R_TO_Y = 1;
  * more colours (with a non-RAINBOW colour scheme): 
     e.g. MAX_COLOURS = 24 and COL_GRAD = 0.125 
     - COL_GRAD should decrease in proportion to MAX_COLOURS
     increasing, with their product roughly 3.0 (also DIFF_COLOURS * SHADES
     should equal MAX_COLOURS ...);  
  * set MAND_LIFE to 1 ... and then try changing LIFE_SCALE or zooming in.
     Note that the MCA is no longer scale-invariant ...
  * Try different values for POWER; 2 is the usual Mandelbrot set,
     5 has four-fold symmetry, 9 has eight-fold etc ...
     Fractional values are also interesting, though less symmetric.	
  * If the blinking colours outside the Mandelbrot set are too distracting,
     set OFLOW_RESET to 0 for a more sedate version.

To do:
  * Replace LEFT_X with CENTRE_X etc.
  * Add better colour schemes or algorithms for such.
  * Fine-tune the settings and calculations, esp. for MAND_LIFE.
  * Implement zooming ...
  * Add better UI for choice of options.
  * Use complex number functions.  
  * Many other things ...


