How To Use The JavaScript Cyclic Cellular Automata Pattern Generator. 11/11/2005.

By Doug Clark.


CONTENTS:

  1. What Are Cyclic Cellular Automata
  2. How To Use The Pattern Generator.
  3. Copying The Images.
  4. References.

LINKS TO DOUG'S WEBSITE:

1. What Are Cyclic Cellular Automata?

The aim of writing the JavaScript Cyclic Cellular Automata Pattern Generator was to explore what could be achieved using JavaScript and XHTML without the use of Applets.

  1. The cyclic cellular automata realised in this display comprise a two dimensional, rectangular array of cells.
  2. Each cell can exist in a number of states corresponding to different colours. The colour states are arranged cyclically. At each update of the array each cell will advance to the next colour, only if the number of neighbourhood cells in that colour exceeds a threshold value.
  3. The neighbourhood is defined as a particular type (diamond or square) and by its size (the range).
  4. For both types of neighbourhoods, range is defined as number of cells transversed in the shortest route from the central cell to the most distant peripheral cell.

At time zero the cells are assigned colours randomly, as the array is updated regular patterns may emerge according to choice of parameters (e.g. number of colours, neighbourhood type and range, threshold) and update rules.

top

2. How To Use The Pattern Generator.

The Pattern Generator is used by setting parameters and pressing the 'Go' button. The 'Halt' button will stop the evolution of the array, and the 'Continue' button will allow it to proceed.

  1. The palette allows selection of the number of colours and the sequence of colours in the cycle. By clicking on the individual cells of the palette, colours can be selcted from a larger pallete of 216 colours. If less than twenty four colours are desired, select the option 'last' after the final colour.
  2. The check boxes determine the update rules for individual colours.
  3. The neighbourhood may be set as diamond or square.
  4. The range may be set as 1, 2, or 3.
  5. The threshold may be set from 1 to 27.
  6. The boundaries of the array may be set in three different ways:
  7. The 'Greenberg-Hastings model' button sets the palette so that all the colours are checked except one. This set of update rules is called the Greenberg-Hastings Model and leads to the evolution of characteristic spiral patterns. The checks can be cleared with the 'Clear Check Boxes' button.

top

3. Copying The Images.

The patterns which develope on the generator can be converted to image files. The ease with which this may be done will depend upon the computer and operating system. I have found the following procedure usable (with a bit of trial and error):

  1. Halt the Pattern Generator and copy a portion of the image to the clipboard. Use the marks on the sides of the image to locate the portion to copy.
  2. Open a Microft Word document and paste to the document.
  3. Repeat Step 1, copying and pasting successive portions of the image.
  4. When all the image has been pasted, select all and alter the font to Times New Roman and the size to 3 pt.
    This should remove any 'gaps' between the rows in the array.
  5. Copy the image and paste to Paint.
  6. Adjust the size of the image to remove unused space and save as an image file.

top

4) References.

top

Hosted by www.Geocities.ws

1