home *** CD-ROM | disk | FTP | other *** search
- (* cp. Toffoli, p.31 *)
- (* program creates rhomb-like shapes and oscillates between states with few
- and many 'alive' cells.
- To initialize the STATE window use event e0 and turn afterwards some few cells
- to alive 'by hand'. *)
-
- RECIPE XYSize = 70;
- XYBound = 1;
- Colors = $2;
- Zet = $2;
-
- CONST Dead = 0;
- Alive = 1;
-
- REF North [0,-1];
- South [0,1];
- East [1,0];
- West [-1,0];
-
- EVENT SetUp;
- RingForm;
- RGBBrush (Dead, 00, 40, 60);
- RGBBrush (Alive, 35, 213, 75);
-
- EVENT E0; (* initialization of the cells *)
- PlFillUni (Dead);
- ShowPlane;
-
- EVENT E1;
- PlClipActive;
- PARALLEL DO
- Self := North XOR South XOR East XOR West;
- OD;
- ShowPlane;
-
- END.
-
- ********************************
- * compilation o.k. *
- ********************************
-
-