\* 2x2 block neighborhood, with nearest neighbors to the block also visible, along with 4 next-nearest neighbors. This implementation of Moore-neighborhood rules on CAM-8 was suggested by Dan Risacher. Note that we pick the order of bit assignment so that bits that are periodic repetitions of the four primary neighbors (ul, ur, ll, lr) are grouped as 2x2 blocks. After bit-copying, but before the bits have been kicked to their new locations, these will form 2x2 copies of those four bits on the Spread display. *\ 0 0 == ul 1 1 == east.ur 2 2 == west.ul 3 3 == ur 4 4 == south.ll 5 5 == south.east 6 6 == south.west 7 7 == south.lr 8 8 == north.ul 9 9 == north.east 10 10 == north.west 11 11 == north.ur 12 12 == ll 13 13 == east.lr 14 14 == west.ll 15 15 == lr : propagate update ul -> south.ll ul -> east.ur ul -> south.east lr -> north.ur lr -> west.ll lr -> north.west ll -> north.ul ll -> east.lr ll -> north.east ur -> south.lr ur -> west.ul ur -> south.west ; \* "update-table" will be specified by the user. "propagate-table" is used in "propagate-step", which must be run before the initial configuration is first updated using "update-table". *\ create-lut update-table create-lut propagate-table ?rule>table propagate propagate-table define-step propagate-step lut-data propagate-table switch-luts site-src lut lut-src site kick run end-step define-step init-step lut-data update-table switch-luts end-step this is when-starting : first-step site-src lut lut-src site kick north.west field 1 x 1 y north.ul field 0 x 1 y north.ur field 0 x 1 y north.east field -1 x 1 y west.ul field 1 x 0 y east.ur field -1 x 0 y west.ll field 1 x 0 y east.lr field -1 x 0 y south.west field 1 x -1 y south.ll field 0 x -1 y south.lr field 0 x -1 y south.east field -1 x -1 y run ; define-step stationary-step first-step end-step this is update-step define-step 100step first-step 99 0 do run repeat-kick loop end-step h# fafa hide-mask ! \ Sets initial value for convenience : dens-map ul ur + bright * 2 / >gray ; colormap dens-map