Neighbourhood

back
The state of a field depends on the state of its neighbours.

THE GAME OF LIFE
The Game of LifeThe Game of Life, published by J. H. Conway in 1970, has evolved to a tremendous field of research between then and now. Just start a Google search at this subject, it is amazing (and largely free of any practical use).

The rules are simple, you can also play it with a pencil and a rubber on squared paper : A certain number of cells live on a pattern. At each move, all those which have too few (0 or 1) or too many (more than 3) neighbours will die. On empty squares with exactly 3 neighbours, new cells are born.

Two things can be noticed:
First, the game is deterministic; hence, for a given initial position, the evolution will always be the same.
Second, if you start from a random initial distribution, "life" will come to an end sooner or later, only static or oscillating groupments will be left on the gameboard.

This applet offers the possibility to vary the rules a little : Some conditions can be applied with a probability between 0 and 100 percent. One interesting modification is for instance to add the rule that a new cell is born on an empty square with two neighbours at a probability of 1 %. Such a slight modification provokes a large change of the game : It is no longer deterministic; static or oscillating figurations are no longer stable. It is also remarkable that the whole board remains in a "living" state longer than with the original rules.

Furthermore, this applet allows to introduce "immortal" (red) cells. These are always counted, like normal cells, but neither move nor disappear. Just see what you can do with it.

UNICOLOR
UnicolorHere, a lot of blue cases vary their brightness in function of their neighbours' behaviour. First, the blue fields fade away, until they are white. The scale contains 50 steps, which are passed within two seconds. Then, the coloration runs into the opposite sense.

As the fields are defined randomly, only a flickering can be observed at the beginning. In order to create structures, interaction between the cells is needed. In this applet, you can check three variations:

In the first one, the brightness of each field is adapted to the mean value of the brightness of its neighbours. This happens at the two turning points, when a cell is white or dark blue.

In the second variation, a cell arriving at the white extreme point makes all eight neighbours fading a little away by one step (of 50). The cell itself will become eight steps darker. This is necessary to avoid the neighbour cells paralysing each other. The opposite thing happens at the blue turning point.

At the third modification, the direction of (de)coloration is turned into the opposite sense, if the majority of the cell's neighbours do the same. When for instance a cell is fading and 5 of its neighbours are moving from white to blue, this cell will switch its direction and become darker.

Mandala
MandalaHere, you can paint ornaments by clicking once at the grey square. If you click several times, however, symmetry will be deranged and the mandala will vanish.

The basis for the calculation of the colours is the RGB system, describing a colour through its components Red, Green and Blue by values between 0 and 255.

During each cycle of 40 milliseconds, the values of the three components of each field are changed by a delta. For the calculation of the three deltas, the difference is formed of the R-, G- and B- components of the considered field and the mean value of the RGB- components of the eight neighbour fields. If the difference oversteps a certain threshold value, the corresponding delta is modified by +1 or -1, in the direction of the mean value.

You can choose between three slightly different mathematical rules:

Method A: It is decided seperately for each of the three RGB components if it oversteps the threshold or not.
Method B: The change of the deltas is decided on the sum of R+G+B.
Method C: Here, the absolute values of R, G and B are added.

You can select the level of the "coulour threshold" by a click.

The meaning of "colour change" is: I have multiplied the RGB values by a factor of p. ex. 10 (so the maximal value is 2550 instead of 255) and divided by 10 again before painting. This enables me to calculate with decimals; I hoped I could manage creating smoother transitions of the colours. This is not the case, but nevertheless something is changing.

Just have a try and enjoy it!


back