CELLULAR_AUTOMATA_LIBRARY

This library allows you to quickly and easily implement
cellular automata calculations in your processing applets.

The results from the library are accurate and have been validated against results from
 mathematica.

For more information on cellular automata click this link.


Tested Platforms: OS X, Windows XP and Vista, Linux)
Last tested with Processing 1.0
Keywords: Cellular Automata, Algorithm
Last Update: Jan/01/09



EXAMPLES
(ZIP FILE)


DOWNLOAD_SOURCE
(GOOGLE CODE)

This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Source code: R110

 

currently available operations: See doc in JavaDoc format

public cellularAutomata()
this operation will make a new celularAutomata matrix. 
int[] numbers = {0,0,0,1,0,0,0,0};
cellularAutomata a = new cellularAutomata(numbers);


public cellularAutomata copy()
makes a copy of a cellularAutomata matrix


public static cellularAutomata calcCA( cellularAutomata x, number of evolutions)
performs a cellular automta calculation. input the cellularAutomata matrix and the number of times you want it to evolve.


public void setValue(int place in matrix, int value you want to set it to 1 or 0)
allows you to manually set values in the matrix.


public float getNumber(int place in matrix)
retrieve values from the cellularAutomata
int good = int(a.getNumber(i));


public int sizeCA()
returns the size of a cellularAutomata.
s = a.sizeCA();

public void setRule(int a, int b,int c,int d,int e,int f,int g,int h)
set the CA rule.


current pattern 

111

110

101

100

011

010

001

000

new state for center cell

int a

int b

int c

int d

ind e

int f

int g

int h