CellEngine/src/ruletables.cpp File Reference

#include "stdafx.h"

Go to the source code of this file.


const char * ruleTables []

Detailed Description

Rule Tables

These are cellular automata rule lookup tables. The even strings are the names, the odd strings are the tables. The list is terminated by two NULL string pointers. The rule table contains a magic number in the first 4 bytes, a neighborhood code in the next four bytes, and a table size byte count in the following four bytes, followed by that many bytes of rule table.

The short 12 byte rules (with rule table size 0) are just used to give names to built-in neighborhood rules.

They were generated by Forth programs, and written out to files. I got tired of porting them around as resource files, so translated them to C data to be compiled into the program.

Note: These strings are so big, they make Microsoft Visual C++ 5.0 choke. It requires that you adjust the project settings to use the "/Zm" flag with a value of, say, 200 percent of normal: "/Zm200".

Definition in file ruletables.cpp.

Variable Documentation

const char* ruleTables[]

generalized parameterized heat diffusion
bit mask of neighbors to add (9 bits)
shift count (power of two division)
frob offset (overall heat gain)
pass in different masks and shifts to implement symetric 8 and 4
neighbor heats, as well as vertical, horizontal, diagonal, and asymetric heat flow fields
logical operations
add pixels
map pixels

Definition at line 28 of file ruletables.cpp.

Generated on Wed Feb 2 09:19:22 2011 for Micropolis by  doxygen 1.5.6