...otherwise a transformation is applied:
Information is read from the marked region:
...is transformed, and then written back to the region:
Areas that are not marked as being "written back to" are left unchanged.
Note that there are two "main" cells involved (in the top diagram) - and
all the links link to one or other of them.
The rule is essentially a fairly simple one. However I'll describe it rather than attemping
to exactly specify it.
If a cell is considered to be "active" if any links point at its centre, and "empty" otherwise.
If either of the two "main" cells is active - and the other is empty - it moves over,
updating any links as it does so (so they remain linked to the same points).
The criterion used to determine whether a cell can move in one direction is
to check whether there are any links attached to it which have a component
in the opposite direction. If not - that cell can move (any such links would
be stretched beyond breaking point if the cell moved away from them otherwise.
This transformation is applied to the grid using the following pattern:
The diagram shows the domain above repeated in a chequer-board pattern -
repeated 16 times. Domains overlap with one another at their corners,
and - since I'm not using enough colours - the pattern can be a bit
difficult to work out.
The rule is applied in sequence, using one of four spatial offsets: (0,0), (0,1), (1,0) and (1,1).
This is the "horizontal" rule. There's also a "vertical" rule:
Information is read from the marked region:
...is transformed, and then written back to the region:
Areas that are not marked as being "written back to" are left unchanged.
The transformation above is applied to the grid using the following pattern:
Note that - in the applet - a cell is displayed as containing membrane if there are
any links in that cell. Unfortunately, this produces some visible gaps - as a look at the diagram of the
"example" membrane near the top of this document illustrates.
A better-quality display routine would mark cells if they had any links going into them.