load step-anag.fth load step-rend.fth 0 0 == shown 1 2 == centers 1 1 == center 2 2 == center' 3 4 == norths 3 3 == north 4 4 == north' 5 6 == souths 5 5 == south 6 6 == south' 7 8 == wests 7 7 == west 8 8 == west' 9 10 == easts 9 9 == east 10 10 == east' 11 12 == fronts 11 11 == front 12 12 == front' 13 14 == backs 13 13 == back 14 14 == back' 15 15 == boundary 1 14 == matter create-lut update-table create-lut reverse-table create-lut propagate-table : propagate update centers dup -> norths dup -> souths dup -> easts dup -> wests dup -> fronts -> backs ; ?rule>table propagate propagate-table \ ******************* define the steps ********************* define-step init-update full-space lut-src site site-src lut display 0 fix lut-data update-table switch-luts end-step this is when-starting : kick0 kick norths field 0 x 1 y 0 z souths field 0 x -1 y 0 z easts field -1 x 0 y 0 z wests field 1 x 0 y 0 z fronts field 0 x 0 y 1 z backs field 0 x 0 y -1 z ; : unkick0 kick norths field 0 x -1 y 0 z souths field 0 x 1 y 0 z easts field 1 x 0 y 0 z wests field -1 x 0 y 0 z fronts field 0 x 0 y -1 z backs field 0 x 0 y 1 z ; : kick1 kick norths field 0 x 1 y 0 z souths field 0 x -1 y 0 z easts field -1 x 0 y 0 z wests field 1 x 0 y 0 z fronts field 0 x 0 y 1 z backs field 0 x 0 y -1 z ; : unkick1 kick norths field 0 x -1 y 0 z souths field 0 x 1 y 0 z easts field 1 x 0 y 0 z wests field -1 x 0 y 0 z fronts field 0 x 0 y -1 z backs field 0 x 0 y 1 z ; \* Let's keep track of what random number we plan to use next, so that we can provide a better display if desired. *\ 0 value next-random define-step free-step0 site-src lut \ these 2 lines can go lut-src site \ away with the latest system kick0 run end-step define-step free-step1 site-src lut \ these 2 lines can go lut-src site \ away with the latest system kick1 run end-step : free-step next-random {{ free-step0 free-step1 }} random 2 mod is next-random ; this is update-step define-step reverse-step lut-data reverse-table switch-luts site-src lut lut-src site kick run switch-luts end-step define-step propagate-step lut-data propagate-table switch-luts site-src lut lut-src site kick run switch-luts end-step define-step preview0 site-src site kick0 run end-step define-step preview1 site-src site kick1 run end-step define-step restore0 site-src site unkick0 run site-src lut end-step define-step restore1 site-src site unkick0 run site-src lut end-step : preview-kick next-random {{ preview0 preview1 }} ; : restore-kick next-random {{ restore0 restore1 }} ; \ ******************* run the experiment ******************** RUN-KEYS key-bindings : Reverse -step-count reverse-step xvds ; press BackSp "Switch directions & negate step-count." 0 value show-kick-mode : show-next-kick ['] preview-kick is before-display ['] restore-kick is after-display ; : show-without-kick ['] noop is before-display ['] noop is after-display ; DISPLAY-KEYS key-bindings : Toggle-kick-display show-kick-mode 1 xor dup is show-kick-mode dup {{ show-without-kick show-next-kick }} .on/off ; press k "Preview state after next kick." \* Put this here temporarily for testing *\ : buffer>2d-slice (s slice# -- ) label# @ labelbuf X Y * length <> abort" Buffer is not the size of a slice!" save-select/sector/src U by V by..1 subsector goto-nth-subsector site-src host #modules 0 ?do select i module scan-io label# @ usebuf i #modules part loop restore-select/sector/src *step* ; \* The following are key commands of use when displaying 3d exp's. *\ : Show-rend Z 0 do zero-space-shift 4 2 space-shift ! perform-space-shift show 4 +loop ; press e "Show rendered viewpoints." : slice-map center 0<> >gray ; : Show-slices colormap slice-map Z 0 do zero-space-shift 4 2 space-shift ! perform-space-shift (show) 4 +loop colormap rend-map show ; press j "Show slices." : std-map 0 >color centers 1 = if bright >green then centers 2 = if bright >blue then centers 3 = if bright >red then ; : Show-slice-contour colormap std-map ['] (show) is show show ; press t "Show slice using contour mapping" : Undo-slice-contour colormap rend-map ['] render is show show ; press u "Undo contour mapping" variable z-shift : Shift-Z z-shift =arg zero-space-shift z-shift @ 1 max 2 space-shift ! perform-space-shift show ; press ^ "Shift in +Z direction" INITIALIZE-KEYS key-bindings : complement-space full-space site-src site map not map! kick run *step* ; : Complement-space complement-space show ; press - "Complement all sites." EXPERIMENT-KEYS key-bindings