The animated picture below visualizes the first evolution steps of a
cellular automata on an hexagonal grid. This cellular automaton idealizes
the formation of a snowflake (cf. "A new kind of science", S. Wolfram,
pp. 369). Black cells represent region of solid and white cells represent
regions of liquid or gaz. The molecules in a snowflake lie on a simple
hexagonal grid. Whenever a piece of ice is added to the snowflake, a little
heat is released which then tends to inhibit the addition of further pieces
of ice nearby. The corresponding evolution rule is very simple: a cell
becomes black whenever exactly one of its neighbors was black the step before.
It is very simple to define an hexagonal grids in MGS: an hexagonal
grids correpond to a GBF (a group indexed datastructure). The underlying
group is (a, b, c; a+b=c) and this presentation is directly used
in MGS to defines the underlying lattice.


gbf
hexa = <a,b,c;a+b=c> ;; 
Definition of a GBF
type. GBF means Group Based Fields. A GBF specifies a uniform
topology where the element are indexed by a mathematical group. Here, all
elements in an instance of the GBF type hexa have three neighbors:
one following the direction a, the other following the
direction b and c. (and also three
others neighbors reached following the inverse directions). This is juste the way in MGS to define an hexagonal grid whose axis are named a, b and c. 
trans
T = (0 as x / (neighborsfold((\a,b.a+b), 0, x)==1) => 1);; 
The transformation consists
in only one rule: a 0 is turned into a 1 if there is only one neighbors with
state 1. 
Back
to top 
MGS examples index 
MGS home page 
Pictures, graphics and animations are licensed under a Creative Commons License.
