HODGE
An implementation of the Hodgepodge Machine
HODGE
is a C program which
implements the "hodgepodge" machine.
HODGE is a two dimensional cellular automaton which is
inspired by the behavior of various catalytic chemical reactions.
The program includes a few variables which control the behavior.
As these variables are set, the computed states may settle down,
become cyclic or chaotic, or sustain the movement of strange
coherent patterns.
Languages:
HODGE is available in
a C version.
Author:
Martin Gerhardt, Heike Schuster, of the University of Bielefeld.
Related Data and Programs:
ISING_SIMULATION
is a FORTRAN90 library which
carries out a Monte Carlo simulation of a 3D Ising model.
LIFE_OPEN_GL,
a C program which
uses OpenGL to display the evolution of John Conway's "Game of Life",
by Simon Green.
MANDELBROT,
a FORTRAN90 program which
generates an ASCII PPM image of the Mandelbrot set;
SIR_SIMULATION
is a MATLAB program which
simulates the spread of a disease through a hospital room of M by N beds,
using the SIR (Susceptible/Infected/Recovered) model.
XFIRES,
a C program which
models the occurrence of fires in a forest, and displays the status
of the forest using X Windows.
XISING,
a C program which
models the variations in ferromagnetism in a material, displaying
the results using X Windows.
XWAVES,
a C program which
simulates the behavior of solutions of certain forms of the wave equation, displaying
the results using X Windows.
Reference:
-
Alexander Dewdney,
Computer Recreations:
The Hodgepodge Machine Makes Waves,
Scientific American,
Volume 259, Number 8, August 1988, pages 104-107.
Source Code:
-
hodge.c, the source code;
-
hodge.csh, commands to compile
and load the source code;
Examples and Tests
-
hodge.map, a color map needed by the program;
-
hodge_output.txt, output from a run
of the program;
-
hodge_000.ppm, PPM file 0;
-
hodge_000.png, a PNG version of the file.
-
hodge_001.ppm, PPM file 1;
-
hodge_001.png, a PNG version of the file.
-
hodge_002.ppm, PPM file 2;
-
hodge_002.png, a PNG version of the file.
-
hodge_003.ppm, PPM file 3;
-
hodge_003.png, a PNG version of the file.
-
hodge_004.ppm, PPM file 4;
-
hodge_004.png, a PNG version of the file.
-
hodge_005.ppm, PPM file 5;
-
hodge_005.png, a PNG version of the file.
-
hodge_006.ppm, PPM file 6;
-
hodge_006.png, a PNG version of the file.
-
hodge_007.ppm, PPM file 7;
-
hodge_007.png, a PNG version of the file.
-
hodge_008.ppm, PPM file 8;
-
hodge_008.png, a PNG version of the file.
-
hodge_009.ppm, PPM file 9;
-
hodge_009.png, a PNG version of the file.
List of Routines:
-
MAIN is the main program for the Hodge-Podge program.
-
GET_STATE computes the state from a cell's value.
-
GRID2PPM writes out the grid converted to a binary color portable pixmap.
-
HODGE carries out the main loop.
-
INITIALIZE initializes the cells.
-
LOAD_COLOR_MAP loads a color map.
-
MAP maps an index to the grid structure.
-
RGB_COLOR turns a value into an RGB string.
-
SCOUNT counts the number of cells in a specified state.
-
VSUM sums the neighbor cell values.
You can go up one level to
the C source codes.
Last revised on 31 December 2007.