'**************************************************
'*This program generates and displays 1-D cellular automata
'*The default starting condition is a single white block in the middle of a black row.
'*The starting condition can be easily changed within the code.  An example that uses a random string
'*as the starting condition has been left commented out of the code.
'*Copyright Joe Campbell. Feb 9-10, 2003
'*Stephen Wolfram's 'A New Kind of Science' is acknowledged as the motivation
'*for writing this code.
'***************************************************
'if a width greater than 1280 is used, you can zoom in and out using "+" & "-"
'you can shift the plot right and left using "<" & ">"
'<SPACE> will recenter image with zoom set to 1/1
'"q" to quit
'***************************************************
'the initial condition can be modified in the code tagged "INITIAL CINDITION"
'adjusting the initial condition strongly effects the output
'***************************************************
'The "rule" is an 8 bit binary number.  Each digit of the number represents
'one of the eight possible nearest-neighbor configurations of a 1-dimensional
'cellular automata.  The value of each bit determines the color
'of the next block.
'For example,  if the rule is 12, then 00001100 is the binary representation.
'this means that if the neighborhood of a block is:
'(000, 001, 100, 101, 110, 111),
'then on the the next row, the block will be (0).
'If the neighborhood is (010, 011) then the next row will have a (1) in that position.
'Sample rules...18 produces a nesting pattern. 30 produces pseudo random data.
'rule 110 produces complex behavior.
'***********************************************

