hp - simulate the hodgepodge machine

hp-helporhp[-widthinteger][-heightinteger][-statesinte-ger][-stepsinteger][-seedinteger][-diag][-wrap][-gdouble][-k1double][-k2double][-freqinteger][-inv][-maginteger][-termstring]

The time evolution of the hodgepodge machine is simulated and plotted according to the specified parameters. The neighborhood of a cell can optionally include or not include diagonal cells in a 3x3 area; Moreover, the neighborhood can also wrap around the edges so that the grid is topologically toroidal. With a proper choice of parameters, this system resembles the Belousov-Zhabotinsky reaction which forms self-perpetuating spirals in a lat- tice. See the RULES section of the manual pages or the source code for an explanation of how the cells change over time.

-widthintegerWidth of the plot in pixels.-heightintegerHeight of the plot in pixels.-statesintegerNumber of cell states.-stepsintegerNumber of simulated steps.-seedintegerRandom seed for initial state.-diagDiagonal cells are neighbors?-wrapUse a wrap-around space?-gdoubleInfection progression rate.-k1doubleFirst weighting parameter.-k2doubleSecond weighting parameter.-freqintegerPlot frequency.-invInvert all colors?-magintegerMagnification factor.-termstringHow to plot points.

If each cell can be in one of N states (labelled 0 to n - 1), then cells in state 0 are ``healthy,'' cells in state n - 1 are ``ill,'' and all other cells are ``infected.'' Within a cell's neighborhood, let Nill, Ninf, and S, denote the number of ill cells, the number of infected cells, and the sum of the states of all neighbors plus this cell's state. The next state is determined by the three rules: Healthy: floor( Ninf / k1 ) + floor( Nill / k2 ) Infected: floor( S / ( Ninf + 1 ) ) + g Ill: magically becomes healthy, thus 0. Where k1, k2, and g are the parameters specified by the command line options.

If you move from (to) an 8 cell neighborhood to (from) a 4 cell neighborhood try dividing (multiplying) k1 and k2 by 2 to produce a similar time evolution that occurred with the previous neighborhood size. For some reason, 4 cell neighborhoods seem to produce pat- terns with more spirals. This simulation can be frustratingly slow at times, so you may wish to use the -freq option to cut down on the over- head of plotting the states.

No sanity checks are performed to make sure that any of the options make sense.

Copyright (c) 1997, Gary William Flake. Permission granted for any use according to the standard GNU ``copyleft'' agreement provided that the author's com- ments are neither modified nor removed. No warranty is given or implied.

Man(1) output converted with man2html