Infect

The central canvas shows a growth medium in which an infectious organism can grow. It represnts a two-dimensional space of cells mapped on to a toroidal world - i.e. the left and right edges are adjacent, likewise the top and bottom edges.  Each cell (pixel) in the canvas can be in one of three states:

The medium evolves in cycles.  In each cycle: Initially, the model is active and all cells are healthy (green).  Other user controls are as follows: DRAGGING with the mouse button is PRESSED repeats the above CLICK operations over the cells it passes.

Pressing [SHIFT] at the same time as a mouse CLICK sprays the action over a much wider area - the spray pattern is random and changes each time.  It is not necessary to keep the [SHIFT] key depressed whilst DRAGGING.

Pressing [CTRL] at the same time as a mouse CLICK locks (logically) the mouse button down.  The mouse button can now be released and the system will respond to mouse movements as though it was being DRAGGED (i.e. as though the button was held down).  The next mouse click (on any button) release this lock.  [Note: this only applies to the LEFT and RIGHT buttons.  JDK 1.1/1.2/1.3 all report the [CTRL] key pressed on the MIDDLE button regardless as to whether it really is pressed.]

Presing [SHIFT] and [CTRL] at the same time as a mouse CLICK combines the above effects.

Finally, there are [FREEZE/IUNFREEZE] and [RESET] buttons.  The [RESET], which clears the medium back to all healthy cells, is only enabled if the system is frozen.

Challenge: with the initial settings of the slider rates, start an infection in the middle and try to eradicate it by spraying.  Now try it with an infection from a corner region.  Reduce the inititial immune persistence rate from 99% to 98%.  Can you still eradicate it?

Experiment: with different settings of the sliders.  The original version of this model had the two right-side sliders at zero.

Enjoy!