Eric Weeks - personal pages - software


C Program to do simple cellular automata

[home] [research]
[software] [pics]
[misc/links] [about me]


Click here to see the source code.

To compile:

gcc -o cell cell3.c -lm

This program creates output suitable for my programs "a2ps" or "a2ppm". For example, the way to use the program is:

cell -n 200 -a 0.45 -b 0.11 -c 0.45 -d 0.0 | a2ppm > picture.ppm

Click here for information about a2ps, making PostScript pictures.

Click here for information about a2ppm, making PPM-format pictures.

The update rule for these cellular automata is that the new state x of cell n is given by:

x_n new = A x_{n-1} + B x_n + C x_{n+1} + D mod 1

where A, B, C, and D are constants chosen ahead of time. For these various pictures below, the four constants are small and between 0 and 2 mostly. I wrote a quick shell script that ran the program about 300 times with random parameters and these are some of the best ones that were produced. I am not going to bother giving you the values for A, B, C, and D for these pictures, although I have them. If for some reason you need them send me an email and I can look them up or put them on this page.


-h: help message explaining options -n: number of cells N; program produces an N by N grid -a: change A -b: change B -c: change C -d: change D

What cellular automata are interesting?

I originally wrote this program when I was at a summer program, and I made lots of CA pictures with randomly chosen rules. Most of them were boring looking, so I decided to do a little bit of work to figure out which ones are interesting. Click here to see some of that work; more interesting pictures.

Some links...

Current address:
Eric R. Weeks
Department of Physics
Emory University
Atlanta, GA 30322-2430