From: David I. Bell (dbell@pdact.pd.necisa.oz.au)
Date: Tue Mar 16 1993 - 06:28:58 UTC
#!/bin/sh # this is LIFE.15 (part 15 of a multipart archive) # do not concatenate these parts, unpack them in order with /bin/sh # file life/lib/obj/gliderturns.l continued # if touch 2>&1 | fgrep 'amc' > /dev/null then TOUCH=touch else TOUCH=true fi if test ! -r shar3_seq_.tmp; then echo "Please unpack part 1 first!" exit 1 fi (read Scheck if test "$Scheck" != 15; then echo "Please unpack part $Scheck next!" exit 1 else exit 0 fi ) < shar3_seq_.tmp || exit 1 echo "x - Continuing file life/lib/obj/gliderturns.l" sed 's/^X//' << 'SHAR_EOF' >> life/lib/obj/gliderturns.l && X! This demonstrates how spaceships can turn a glider in various ways, X! and also duplicate it. X! Dean Hickerson X36k90h@! X....O X.....O XO....O X.5O95.5O X100.O....O X100......O....................................................O X100.....O......................................................O X100..........................................................OOO X. X. X. X. X. X. X53.....OO X53.OOOO.OO X53.OOOOOO X54.4O78.O X132......O X132.O....O X132..OOOOO X. X. X. X. X. X45...OO X45.OO.OO X45.OOOO X45..OO X143.OO X35.6O98.4O.OO X34.O5.O98.6O X40.O99.4O X39.O X39.................OO X39..............OOO.OO............OOOOOO X39..............OOOOO............O.....O X39...............OOO...................O X39....................................O X. X. X. X39..................................OO X39..............................OOOO.OO X39..............................OOOOOO X39...............................OOOO X. X. X. X. X. X. X. X. X39......................................................O X39.......................................................O X39..........................OO.....................O.....O X39......................OOOO.OO.....................OOOOOO X39......................OOOOOO X39.......................OOOO X. X. X. X. X. X. X. X. X39..............................................................O X39...............................................................O X39.........................................................O.....O X39..........................................................OOOOOO SHAR_EOF echo "File life/lib/obj/gliderturns.l is complete" && $TOUCH -am 0314153893 life/lib/obj/gliderturns.l && chmod 0644 life/lib/obj/gliderturns.l || echo "restore of life/lib/obj/gliderturns.l failed" set `wc -c life/lib/obj/gliderturns.l`;Wc_c=$1 if test "$Wc_c" != "1528"; then echo original size 1528, current size $Wc_c fi # ============= life/lib/obj/fanout.l ============== echo "x - extracting life/lib/obj/fanout.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/fanout.l && X! "main" (cells 404 length 57 width 200 generation 0) X! This is a glider "fanout device". X! This can easily duplicate a glider an arbitrary number of times. X! Aased on an idea by Bill Gosper. X28k100h@! X62.O X62..OO X62.OO X. X. X. X. X. X174...O X174..OO X174.OO...........OO X41.O118.O.O10.3O6.O4.3O X40.4O115.O..O11.OO4.OO7.OO.O X39.OO.4O5.OO96.O8.OO15.OO4.OO6.O..O5.OO X23.OO13.3O.OO3.O3.O..O93.O.O5.OO3.O14.O12.OO.O5.OO X23.O.O13.OO.OO3.O7.O92.OO.O6.OO27.3O X11.O12.3O13.5O3.O6.O6.OO84.OO.OO6.O..O24.OO X8.4O13.3O13.O3.3O7.O6.OO84.OO.O8.O.O X7.4O6.O.O4.3O24.O..O83.OO8.O.O XOO5.O..O7.OO3.O.O25.OO84.O.O9.O9.O XOO5.4O7.O4.OO112.O22.O X8.4O27.O96.OO20.3O X11.O.........................OO......OO.........OO X11............................OO....O..O.......O..O X11..................................OOO.........OOO X11...............O.....................OOOOOOOOO X11................OO..................O..OOOOO..O X25.OO19.OO..3O..OO135.OO X190...O X190.O.O X34.O..O26.O..O26.O..O26.O..O26.O..O32.OO X38.O29.O29.O29.O29.O X34.O3.O25.O3.O25.O3.O25.O3.O25.O3.O X35.4O26.4O26.4O26.4O26.4O X. X12...........O.O X12..........O..O X12.OO......OO.............OO X12.OO....OO...O.....OOO...O.O X12.........OO.........O......O.......OO X12..........O..O.....O....O..O.......OO X12...........O.O.............O X12........................O.O X12........................OO..............................................OO X12.........................................................................O X84.O.O....O X84..OO...O.O.........OO X84.....OO...O.......O.O...O X84.....OO...O.........O...OOOO........................O.O X84.....OO...O..............OOOO......................O..O X84.......O.O...............O..O........OO...........OO..........OO X84........O................OOOO........O.O........OO...O........OO X84........................OOOO....OO......O.........OO X84........................O......O..O..O..O..........O..O X84................................OO......O...........O.O X84.....................................O.O X84.....................................OO SHAR_EOF $TOUCH -am 0314162893 life/lib/obj/fanout.l && chmod 0644 life/lib/obj/fanout.l || echo "restore of life/lib/obj/fanout.l failed" set `wc -c life/lib/obj/fanout.l`;Wc_c=$1 if test "$Wc_c" != "2015"; then echo original size 2015, current size $Wc_c fi # ============= life/lib/obj/heisenburp.l ============== echo "x - extracting life/lib/obj/heisenburp.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/heisenburp.l && X! "main" (cells 491 length 153 width 123 generation 0) X! This is a period 120 "Heizenburp device". X! It senses and duplicates gliders without affecting the glider's path. X! So there is no such thing as the "Heizenburg Uncertainty Principle". X! David I. Bell, December 1992 X76k61h@! X46.........................................................OO X46.........................................................OO X. X46............................................OO X46............................................OO X. X. X. X. X. X46...........................................OOO...........OOO X46..........................................OO.OO.........O...O X46..........................................OO.OO........O.....O X46..........................................OOOOO........O.....O X46.........................................OO...OO..........O X46........................................................O...O X46.........................................................OOO X46...........................................OO.............O X46..........................................OOOOO X46..........................................O X46............................................OOO............OOO X46..............................................O............OOO X46............................................OO............O...O X46............................................OO......O.O X46....................................................OO...OO...OO X46.....................................................O X46.......................................OO...OO X46.......................................O.O.O.O X46...................OO...................OOOOO.....O.O X46...................OO....................OOO.......OO X46..........................................O........O X46................................OO X46................................OO............................OO X46................................OO............................O X46..................OOO............O.............................OOO X46..................OOO...........O.O.........OO...................O X46.................O...O..........O.O.........O X46.................................O...........OOO X46................OO...OO........................O X. X46..............................OO...OO.................OOOO X46..............................O.O.O.O............OO.......O X46...............................OOOOO.............OO..OO...O X46................OOO.............OOO..................OO..O X46....................OO...........O...........................................O X46....................OO.....................................................OOO X46.....................OO...................................................O X46...................O.O....................................................OO X46...................OO X. X. X46..............OO...OO.........O.O X46..............OO...OO.........OO.......................................OOO X46..........................O....O......................................OO.OO X46................OOO........OO.........................................OO.OO X46................OOO.......OO..........................................OOOOO X46.................O................OOO................................OO...OO X46.................................O...O X46........................O.......O.....O X46......................OO.........O...O....................O X46..............OO.......OO.........OOO.....................O.O X46...............O..................OOO.....................OO..........OO X46............OOO X46............O...................OO X46.................................O X46..............................OOO.......................................OO X46..............................O.........................................OO X46....................O.O X46.......................O X46...................O....O..OO X46...................OO.O..O.OO X46.O.....................OO X46.OOO X46....O X46...OO X. X. X. X. X. X. X46...OO...OO X46......O X46...O.....O X46....OO.OO X46.....O.O X46......O X46......O X. X46.......................O....O X46...OO...................O...O.O.........OO X46....O.................OOO...OO...........O X46.OOO...OO................................O.O......O.O X46.O.....OO.................................OO......O...O X46......................................................O.......O X46..................................................O....O....OOOO X46......................................OOO.............O....O.O.OO X46.................................OO...O...........O...O...O..O.OOO........OO X46.................................O.O...O..........O.O......O.O.OO.........OO X46...................................O........................OOOO X46...................................OO.........................O X46........................OO.........................O X46........................OO............OO...........O.O X46......................................O.O..........OO X46.......................................OOO X46........................................OO.....OO X46.....................................OO........OO X46.....................................OOO X46............................................................O.O X46.......................................................OO...O..O X46......................................OO........OO..OO.OOO.....OO......OO X46......................................OO.......O.O...O...O...O...OO....OO X46..............................................O........O.O.....OO X46..............................................O..O......OO..O..O X46..............................................O.............O.O X46.......................................OO......O.O X46......................................O.O.......OO X46......................................O X46.....................................OO X. X..............................OOO X................................O X...............................O X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. XOOO X..O X.O SHAR_EOF $TOUCH -am 0314163593 life/lib/obj/heisenburp.l && chmod 0644 life/lib/obj/heisenburp.l || echo "restore of life/lib/obj/heisenburp.l failed" set `wc -c life/lib/obj/heisenburp.l`;Wc_c=$1 if test "$Wc_c" != "5965"; then echo original size 5965, current size $Wc_c fi # ============= life/lib/obj/life34.l ============== echo "x - extracting life/lib/obj/life34.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/life34.l && X! "life34" (cells 44 length 11 width 38 generation 0) X! This demonstrates several life forms in the 3-4 life universe. X! These rules are 3 or 4 to be born, and 3 or 4 to stay alive. X! Objects at left, center, top, and bottom are oscillators with X! periods of 4, 2, 3, and 12. The object at right is a glider X! which travels at 1/3 the speed of light with period 3. X;rules 34,34 X5k20h@! X........................OOO X........................OOO X........................OOO X.OOOO XO....O..........O...................O XO....O........OOO...................OO XO....O..........O...................OO XO....O..............................O X.OOOO...................OO X........................OOO X........................OOO SHAR_EOF $TOUCH -am 0312101691 life/lib/obj/life34.l && chmod 0600 life/lib/obj/life34.l || echo "restore of life/lib/obj/life34.l failed" set `wc -c life/lib/obj/life34.l`;Wc_c=$1 if test "$Wc_c" != "714"; then echo original size 714, current size $Wc_c fi # ============= life/lib/obj/counter.l ============== echo "x - extracting life/lib/obj/counter.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/counter.l && X! "main" (cells 831 length 156 width 116 generation 0) X! This is a binary counter. It demonstrates how the period of a glider X! stream can be doubled. X! Dean Hickerson X87k45h@! X13......................OO X13.....................O X13....................O..OO..........OO................OO........OOO X13.O..................O..O...........OO................OO........O...O X13.OO.................O.O........................................O....O XOO9.O.3O17.OO41.O3.O20.OO9.OO XOO13.OO85.OO8.OO X14.OO17.OO9.OO30.O3.O17.5O X14.O17.O.O7.OO3.O27.O4.O17.4O X32.O..O......O....O.................OO........O...O X3.O10.O17.O..OO5.OO3.O17.OO8.3O7.O12.4O X..O.OO8.OO17.O10.OO39.O.O10.5O X.3O.OO8.OO17.OO49.OO15.OO X..O..O5.O.3O85.OO X3.OO........OO X3...........O.................O.O X3..............................OO X3..............................O X. X. X. X3........................................................................O X3.......................................................................O X3.......................................................................OOO X. X. X3.........................................O X3..........................................OO X3.........................................OO X. X. X. X. X3............................................................O X3............................................................O.O X3............................................................OO X36.OOOO........................................O.O..OO X36.O..OO......OO................OO............O...O.OOO X36..O..OO.....OO.....O.O........OO.............O......OO X10.OO25.O..O14.OO24.5O.O5.O3.OO XOO6.OO.OO25.OO15.O28.3O4.OO.O.3O13.OO XOO6.O..O79.O4.3O13.OO X8.O..O26.OO44.3O4.O3.O X9.OO26.O..O40.5O.O4.3O X37.O..OO.......................OO.............O......OO.................OO...OO X9.OO25.O..OO24.OO12.O3.O.3O4.3O10.3O3.3O X8.O..O16.O7.4O40.O.O..OO4.O3.O7.3O7.3O X8.O..O17.OO30.OO28.O4.3O4.3O7.3O X8.OO.OO15.OO32.O28.OO.O.3O4.3O7.3O X10.OO49.O31.O3.OO6.3O3.3O X51...........OO...........................................OO...OO X. X. X51...........................O X51...........................O.O X51...........................OO X. X. X. X. X. X. X. X. X51................O X51...............O X51...............OOO X. X. X51.O X51..OO........................O X51.OO.........................OO X23.OOO.....OOOO............OO................OO.........O.OOO X23.OO6.OO.O12.OO16.OO13.OO27.O..O X25.O8.O44.OO18.3O7.O XOO12.OO..O13.OO45.O18.O4.O9.O XOO12.O.OO36.O42.O5.O8.OO X15.O16.OO20.O.O22.O18.O8.O X15.3O8.O7.O19.OO23.OO18.OO8.OO X23.OOOO....OO.O..............................OO.............OO X15.3O7.OO4.4O30.OO9.O.3O18.OO8.OO X15.O62.OO18.O8.O3.O X14.O.OO6.O36.OO15.O18.O5.O4.O..O X14.OO..O43.O35.O4.O4.O..O X36..........................O...................O.................OOO.......OO X36..........................OO.................O X36.............................................OOO X. X. X36.O X36..OO X36.OO X. X. X. X. X36..................................O X36..................................O.O X36..................................OO X. X. X. X. X. X. X. X36........................................OO X30.OOO..............OO.........O......OO......OO.OO X30.O...O............OO........O.......OO......O..O X30.O....O.....................OOO.............O..O.........................OO XOO14.OO13.O3.O38.OO26.O.O7.OO XOO15.OO83.O.OO6.OO X13.5O13.O3.O7.3O28.OO27.OO X13.4O13.O4.O5.OO.O.OO25.O..O26.O X30.O...O.....O.....OO.................OO......O..O X3.OO8.4O13.3O8.OO.O.OO17.OO6.OO.OO25.O X..O.O.OO5.5O25.3O29.OO7.O18.OO X.OO3.OO9.OO42.OO21.O.O15.O.OO X..O.O.OO8.OO44.O21.OO16.O.O X3.OO41.O14.O40.OO X..............................................O.O............OO X................................O.O...........OO X.................................OO X.................................O X. X. X. X.........................................................................O X........................................................................O X........................................................................OOO X. X. X............................................O X.............................................OO X............................................OO X. X. X. X. X.............................................................O X.............................................................O.O X...................................O.O..OO...................OO X..................................O...O.OOO....OO X...................................O......OO...OO X........O...OO......................OOOOO.O XOO....OO.O.OOO.........................OOO XOO....O....OOO X......O...O............................OOO X.......OOO..........................OOOOO.O..................O X...................................O......OO................O.O X.......OOO........................O...O.OOO.......O..........OO X......O...O........................O.O..OO.......O X......O....OOO...............O...................OOO.........OO X......OO.O.OOO................OO..............................O X........O...OO...............OO..............................O X.............................................................OO SHAR_EOF $TOUCH -am 0314154093 life/lib/obj/counter.l && chmod 0644 life/lib/obj/counter.l || echo "restore of life/lib/obj/counter.l failed" set `wc -c life/lib/obj/counter.l`;Wc_c=$1 if test "$Wc_c" != "5055"; then echo original size 5055, current size $Wc_c fi # ============= life/lib/obj/blockpusher.l ============== echo "x - extracting life/lib/obj/blockpusher.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/blockpusher.l && X! "main" (cells 630 length 145 width 137 generation 0) X! Block pusher 5 X! Population is bounded, but some cells never become periodic. X! A 3 glider salvo pushes a block 10 units southeast and sends back X! 2 gliders, which cause another salvo to be fired. The round trip X! time increases by an average of 80 generations each time. More X! specifically, for n>=0, a salvo hits the block in generation X! 40 n^2 + 760 n + a[n mod 3], where a[0]=426, and a[1]=a[2]=626. X! Dean Hickerson, drhickerson@ucdavis.edu 4/16/91 X72k68h@! X7..................................OO X7................................O..O X7...............................O X7...............................O X7.....................OO........O X7.........OO.........O..OOO......O..O..OO...OOOO................OO X7.........O...........OO...........OO..O....OO..O..............O X7...........................................OOOO..............O X7....................................................O........O.........OO X7...................................................O.........O.........O X7...................................................OOO........O X7...............................................................OO X7............................OO X7............................O X7..........................O.O X7..........................OO X7.....................O.......................................OO X7...O................OOOOO.....................................O X7.OOO.................O.OO.....................................O.O XOO.....O..O......................OO..................................OO........O XO6.3O23.O45.3O X9.O68.O..O7.OO X33.O..O..........................................OOO.......O.O...O X23.OO.......O..O................................OO.........O..........OO.OO......OO X5.OO16.O8.O.O34.O24.OO5.O X5.O...........................O.................OO X5...........................................OOOO....OO.........O..O X5.............................OO............OOO.OO..O...........O..O X5.............................O..................O...............O.O......OO X5.................................................................O.......O X5..O.....................................OO X5..O.O....................................O......................OO X5..OO.....................................O.O....................O X5..........................................OO X5......................................................OO.....OO X5..OO..............................................OO..O.O....O X6.O.O44.O.O..O20.OO11.OO10.OO X7.OO44.OO24.O..O6.3O..O9.O X19.O...............................................................O........OO X19.OOO.............................................................O X19....O............................................................O X19...OO.................................................OO.....O..O X19.....................................................O.O.....OO X19.....................................................O X19....................................................OO X19.............................OO X19.............................O X5.OO...OO.........O.....O X5.O.....O.........O.....O X5..................O...O X6.O3.O12.3O90.OO X7.3O84.O21.O X71....O..................O.O..................O.O X71..OOO.......OO............OO......OO........OO X71.O..........O..........OOO........O.O..O X71.OO................................OO..O.O X71.......................................OO X. X8.OO104.OO X8.O14.OO89.O X23.O..............................................O X68.O.O........................................................OO X34.O34.OO56.O X10.........................OOO...............................OO X10......O..O..................O..............................OO X10.OO..OO...O................OO.............................O.O X10.O8.O47.OO42.O5.O10.O X5.OO8.4O92.O5.O10.O X5.O106.O3.O11.O X113.OOO...........O.O X28.O98.O.O X26.3O42.OO55.O X25.O.............................................O X25.OO.............................................OOO X25..............O.O.................................O X25..............O..O X25..............O.O X25...............O.....OO X20.O5.O12.O4.O.O81.O X4.3O13.O5.O17.O67.O14.O X4.O.O14.O3.O17.OO66.3O13.3O X22.3O4.O81.3O X5.O.......................OOO X4.O.O25.O6.OO68.OO3.OO X31.OO6.O69.O5.O11.OO3.OO X127.O.....O X6.OOO X6.3O119.O3.O X5.O3.O119.3O X4.O.....O X5.O3.O99.OO X6.3O13.O87.O X21.3O10.O72.3O X22.OO9.O.O71.O X33.O.O96.3O X20.O12.3O96.3O X18.OO.O11.3O95.O3.O X19.OO109.O5.O X131.O...O X131..OOO X31.OO83.O X7.OO23.O79.OO..OO.3O X7.O21.3O45.OO33.O5.4O X29.O46.O.O37.OO X20.OO........................................................O X20.O X20...................................OO X20...................................O X20....................O..........................................................O X20...................OO.O.......................................................O X27.OO9.O3.O54.3O32.O X27.O10.OO.O88.O.O X39.O6.OO7.O75.OO X46.O.O6.O.O72.OO X48.O6.OO73.OO X48.OO79.O.O X55...........................................................................OO X55.OO.................................................OO X55.O.O................................................O X55..OO X. X133.OO X133.O X133..OOO X133....O X50...OO X50....O X50.OOO X50.O X. X. X. X. X50..................O X50.................OO X50.................O.O X. X50...........OO X50...........O.OO.O X50...OO.......OOOO X50...O...........OOO X50......................OO X50......................O.O X50........................O X50........................OO SHAR_EOF $TOUCH -am 0314155293 life/lib/obj/blockpusher.l && chmod 0644 life/lib/obj/blockpusher.l || echo "restore of life/lib/obj/blockpusher.l failed" set `wc -c life/lib/obj/blockpusher.l`;Wc_c=$1 if test "$Wc_c" != "5457"; then echo original size 5457, current size $Wc_c fi # ============= life/lib/obj/p210fanout.l ============== echo "x - extracting life/lib/obj/p210fanout.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/p210fanout.l && X! "main" (cells 437 length 159 width 172 generation 0) X! This demonstrates a "fanout" device, which replicates a glider an X! arbitrary number of times. X! David I. Bell X79k86h@! X98...............................................O.O X98...............................................O...O X98...................................................O.......O X98.OO..................................OO........O....O....OOOO X98.OO....OOO...........................OO............O....O.O.OO X84.O10.OO6.5O36.O3.O3.O..O.3O8.OO X84.O.O7.3O5.O3.O.O35.O.O6.O.O.OO9.OO X87.OO......OO......O...OO.............................................OOOO X73.OO12.OO9.OO56.O X73.OO............OO.........OO.............................................O X73............O.O..........................................................O.O X73............O...........O................................................OO X73......................O.O X73.......................OO X. X. X73..................................................................O X73..............................OOO................................O X73.............................O.....OOO...........................OOO X73............................O......O X73............................O...OO X73............................O....O X73.............................OO X73......................................................................OOO X73......................................................................O X73.......................................................................O X. X73.........................OOO X73...........................O X73..........................O........................................OO X102.......................................O.........OO.........OO X102....................................OOO..........O.O.......O.O X102.OO.................................O......O.....O........O......OO..OO X79.O8.O..O10.O40.O.O13.O..O..O..O.OO X78.O.O10.O11.3O36.O.OO13.O6.OO X71.OO3.OO3.O5.OO3.O..O9.O35.OO.OO14.O.O X71.OO3.OO3.O4.O.O.OO3.4O43.O.OO15.OO X76.OO...O..............OOOO......................................OO...O.O X76...O.O.....OO........O..O.....................................O.O....O X76....O................OOOO.................................O...O X76....................OOOO....OO..........................OOO..OO X76....................O.......O.O........................O X76..............................O........................OO X76..............................OO X. X. X. X76........................................O X76......................................OOO X76.....................................O............OO...OO X76.....................................OO....O.O....OO...OO X76...........................................OO......OOOOO X76............................................O.......O.O X. X76....................................................OOO X. X. X. X. X. X76.....................................................OO X76.....................................................OO X. X. X. X. X. X. X. X76..........O X76..........O.O X76..........OO X. X. X.........................OO X.........................O..O X...........O.O...............O X.........O...O..OOO..........O......OO X.........O...................O......OO X..OO....O....O.......OO..O..O X..OO.....O.......O.O..O..OO X.........O...O.....OOO X...........O.O X. X. X............................O X.............................O X...........................OOO X. X....................................OOO X. X. X. X. X..............................OO X.............................O.O X...............................O X. X. X. X. X. X......................OOO..........................................O X........................O......OO................................OO X.............O.........O.......O..................................OO X............O.O.................OOO XOO..........OO.O........O.O.......O XOO..........OO.OO......O..O X............OO.O......OO X............O.O.....OO...O X.............O........OO X.......................O..O.....OO X........................O.O.....O.O.......OO X..................................O......O.O X..................................OO.....O X........................................OO X. X...........................................................OO X...........................................................O.O X.............................................................O X.................................................OO..........OO X..................................................O X...............................................OOO X...............................................O X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X91.OOO X91.O X91..O SHAR_EOF $TOUCH -am 0314153593 life/lib/obj/p210fanout.l && chmod 0644 life/lib/obj/p210fanout.l || echo "restore of life/lib/obj/p210fanout.l failed" set `wc -c life/lib/obj/p210fanout.l`;Wc_c=$1 if test "$Wc_c" != "4619"; then echo original size 4619, current size $Wc_c fi # ============= life/lib/obj/bounce.l ============== echo "x - extracting life/lib/obj/bounce.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/bounce.l && X! "main" (cells 14 length 9 width 10 generation 0) X! The reaction which uses a block to bounce two gliders. X4h@! X.O......O X..O....O XOOO....OOO X. X. X. X. X....OO X....OO SHAR_EOF $TOUCH -am 0314154193 life/lib/obj/bounce.l && chmod 0644 life/lib/obj/bounce.l || echo "restore of life/lib/obj/bounce.l failed" set `wc -c life/lib/obj/bounce.l`;Wc_c=$1 if test "$Wc_c" != "165"; then echo original size 165, current size $Wc_c fi # ============= life/lib/obj/shiptoggle.l ============== echo "x - extracting life/lib/obj/shiptoggle.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/shiptoggle.l && X! "main" (cells 186 length 61 width 73 generation 21) X! A switchable period 30 LWSS gun. Gliders from two directions can enable X! and disable the gun. Two such gliders are shown. This also demonstrates X! an in-line NOT gate for glider guns. X! David I. Bell X16k40h@! X............................O.....OO X..........................O...O...OOO X..............................O.....OO.O........O X.........................O.....O....O..O......O.O X.........................OO.........OO.O.....O.O X..................................OOO.......O..O...........OO X..................................OO.........O.O...........OO X..............................................O.O X......................................O.........O X...........OO.......................OO X..........OOOO...........OO..........OO X.........OO.OO..........OO.OO............OO X..........OO.............OOOO............O.O X..........................OO.............O X. X......................................OO X.............................OO......O.O X............................O.O........O X............................O X...........................OO...................OOO X................................................O X.................................................O.........O X..........................................................O.O X..............................OOO.............O.O........O.OO..........OO X...................O............O.............O..O......OO.OO..........OO X...................OOOO........O.................OO......O.OO X.........OO.........OOOO..........OO...........O...OO.....O.O X.........OO.........O..O.........O.O.............OO........O X..............O.....OOOO........OOO...........O..O X..............O....OOOO........OOO............O.O X...................O............OOO X.................................O.O....................OO X..................................OO....................O.O X........................................................O X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. X. XOOO X..O X.O SHAR_EOF $TOUCH -am 0314153393 life/lib/obj/shiptoggle.l && chmod 0644 life/lib/obj/shiptoggle.l || echo "restore of life/lib/obj/shiptoggle.l failed" set `wc -c life/lib/obj/shiptoggle.l`;Wc_c=$1 if test "$Wc_c" != "2014"; then echo original size 2014, current size $Wc_c fi # ============= life/lib/obj/detector.l ============== echo "x - extracting life/lib/obj/detector.l (Text)" sed 's/^X//' << 'SHAR_EOF' > life/lib/obj/detector.l && X! "main" (cells 69 length 23 width 114 generation 0) X! This shows a multiple "glider detector" which is useful to count gliders. X! David I. Bell X11k88h@! X82..O.............O X82...O.............O X82.OOO...........OOO X82...........O.............O X82...........OOO...........OOO X82..............O.............O X82.............OO............OO X. X. X. X. X. X.OOOOO.........................OOOOO.........................OOOOO XO....O........................O....O........................O....O X.....O.............................O.............................O XO...O.........................O...O.........................O...O X..O.............................O.............................O X. X. X98.OO............OO X98..O.............O X98.O.............O X98.OO............OO SHAR_EOF $TOUCH -am 0314154093 life/lib/obj/detector.l && chmod 0644 life/lib/obj/detector.l || echo "restore of life/lib/obj/detector.l failed" set `wc -c life/lib/obj/detector.l`;Wc_c=$1 if test "$Wc_c" != "764"; then echo original size 764, current size $Wc_c fi # ============= life/life.doc ============== echo "x - extracting life/life.doc (Text)" sed 's/^X//' << 'SHAR_EOF' > life/life.doc && X LIFE X program by David I. Bell X 16 Mar 1993 X XIf you do not know what the Game of Life is, see the appendix at the end. XExcept in that appendix, the remainder of this document assumes that you Xknow the rules and terms of the game. X XThis program plays the Game of Life on a practically infinite board by using Xsparse matrices. Therefore there is no hard limit on the size of a Life Xobject except for its memory requirements. The memory requirements depend Xon the number of live cells of the object, and not on their locality. The Xtime needed to compute one generation also depends on the number of live cells. XThe speed is such that on a 20MZ 386, an object with 5000 live cells takes Xabout 1 second of run time per generation. Typical objects run much faster. XNote that this program is designed for its editing and viewing capabilities, Xnot for its raw speed. (Use xlife for much faster calculations, for example.) X XThis program can run either on normal terminals which provide a view of about X24 by 80 cells using characters, or else on graphics devices with a view many Xhundreds of cells wide and high using individual pixels. Almost all commands Xwork identically between the two different modes of operation. The main Xdifferences are simply the differing resolutions of the displays and the Xoptional use of a mouse. X XWhether or not graphics is used is dependent on the command line options, Xand on the LIFEOPTS environment variable. The LIFEOPTS environment variable Xcan contain a list of options as used on the command line. The life program Xprocesses these options first, then processes the options on the command line. XIn this way, the user can have default options specified, and still be able Xto override them when desired. X XIf no options have been given, or if the -t option is specified, then the Xmode is assumed to be for a normal terminal, and curses routines are used to Xupdate the screen. If the -g option is specified, then the mode is assumed Xto be for graphics, and a new window is opened and used for the display. XIf both options are specified, then the last one specified is effective. X XIn either mode, the view is a window into an effectively unbounded Life array. XThere is a cursor which always represents the location of interest. The view Xis shifted as necessary to always keep the cursor visible. There are commands Xwhich move the cursor, and these will implicitly reposition the view when the Xcursor tries to move out of the view. X XWhen an object is large, then not all of it might be seen at once. In this Xcase, the view can be scaled down so that more of the object can be seen at Xone time. A scale factor of 1 to 1000 can be applied, which means that each Xcharacter (or pixel) on the screen represents a square of the given size. XObviously, details of the object is lost when this is done, but scaling is Xstill useful for seeing the overall structure of a large object and to Xposition the cursor within the object. When the output is to a terminal, Xthen each position containing live cells is marked with a number from 1 to 9, Xor an asterisk. A number is the actual count of live cells in the square, Xwhile an asterisk means there are 10 or more live cells in the square. For Xgraphics output, each individual pixel simply means there are one or more Xlive cells in the square. X XOn a graphics screen, representing each cell by individual pixels makes Xseeing or editing of small objects difficult. So the view can be scaled up Xso that each cell is represented by a square number of pixels. Negative Xscale factors specify the size of the square representing a cell. If the Xscale factor is -2, then the cells run into each other. If the scale factor Xis -3 or smaller, then blank lines separate each cell so that the individual Xcells can be distinguished easily. Negative scale factors are not allowed Xwhen output is to a terminal. X XThere are two different kinds of commands to the life program. These are the Xcharacter mode commands, and the line mode commands. X XLine mode commands begin with either a colon or a semi-colon character, and Xare terminated by an end of line character. These commands are full words Xwhich can be abbreviated, followed by possible arguments. Line mode commands Xare echoed at the top of the screen as they are being entered, so that editing Xof them is easy. If generations are currently being run at the time a line Xmode command is started, the calculations will be suspended until the command Xis completed. Use the ';help' command to list all of the line mode commands. XMany of them are obvious, and are not described explicitly in this document. X XCharacter mode commands are short sequences of characters which are self- Xterminating (in the same manner as the commands to the vi editor). They do Xnot echo as they are being entered. Until the character sequence is complete, Xit can be edited using the normal erase and kill characters. When the Xsequence is complete, then it is executed. Unlike line mode commands, Xgenerations can still be run while a character mode command is being entered. XThis allows the repositioning of the view and the changing of scaling factors Xwithout having to stop an object. However, many character mode commands X(such as ones which change an object) are illegal while the object is running. X XCharacter mode commands can be preceded by zero, one, or two numeric arguments. XThese arguments are generally used as a count of how many times the command Xis to be executed. Missing arguments are defaulted to 1 (with the exceptions Xnoted in the tables while appear later). If two arguments are specified, they Xare separated by a comma. So a character mode command can take one of the Xfollowing forms: X <cmd> Both arguments defaulted. X <arg1> <cmd> First argument given, second is defaulted. X<arg1> , <arg2> <cmd> Both arguments given. X XA numeric argument is usually an explicit number. But it can also be an Xnumeric expression enclosed within parenthesis, or else one of a set of Xspecial values which are described later. For example, the command '(2+3)L' Xis the same as '5L'. X XMost commands (and the region being viewed), are based on the current cursor Xlocation. To change the viewing region, or to point at a location in the Xobject that you wish to modify, you must move the cursor around in the object. XTo do this, you use some single character commands. The directions for Xmovement are based on vi, so that for example, 'h' moves left, 'j' moves down, X'y' moves to the upper left, and so on. The commands are multiplied by the Xscale factor, so that you can move about in large objects easily. In addition, Xthey accept an optional preceding numeric argument, which multiplies their Xmovement by the given amount. X XThe movement commands when capitalized perform a shift of both the cursor Xand the viewing region together by 1/4 of the screen size. This is useful Xto shift the view slightly to see an object on the edge better. When Xshifting diagonally, movement is always at 45 degree angles, independent Xof the relative sizes of the width and height of the screen. X XThe simplest commands for changing an object are 'o', 'x', 't'. The 'o' Xcommand creates a live cell and moves the cursor to the right. The 'x' Xcommand creates a dead cell and moves the cursor to the right. Both of Xthese commands can accept a numeric argument which replicates their action Xby the given amount. As an example, the command string '25o' creates a row Xof 25 live cells. The 't' command toggles the current cell from dead to Xalive (or from alive to dead) without moving the cursor, and is usually Xthe most convenient command to use when editing an object by hand. X XThe ';mode' command sets a mode in which some of the movement commands Xdescribed earlier automatically insert or delete cells. This makes it easy Xto create lines of cells in any direction. The argument is either 'insert', X'delete', or 'move', which may be abbreviated. For example, if the mode is Xinsert, then the command '20j' will create a row of 20 cells downwards. X XTo compute generations, you use the 'g' or 'G' commands. The 'g' command Xcomputes a single generation of the current object, or as many generations as Xis specified in its preceding argument. The 'G' command simply means run Xfor an infinite number of generations. If the object dies or becomes stable, Xcomputations automatically stop. (However, loops of period 2 or greater are Xnot detected.) While generations are running, and you supply an argument to Xthe 'g' command, then the specified number of generations gets added to the Xones already being computed. On the other hand, if generations are running, Xand you use the 'g' command with NO arguments, then computations are stopped Ximmediately. X XWhile generations are being computed, you can use the movement and scaling Xcommands to wander around the object. But attempts to change the object Xwhile it is running will be rejected. If you wish to wait until the Xindicated computations are complete before the next command is executed, Xuse the ';wait' command (this is useful inside of a command macro or loop). X XNormally each generation will be displayed as it is computed. To speed up Xthe computations when you don't want to see every generation, use the X';frequency' command to set how often the screen is updated. X XThis program can simultaneously handle more than one Life object. Each object Xis distinct and has its own name. You move between objects to select the one Xthat you wish to edit or display. The ';edit' command switches between objects X(defaulting to the the previously edited object if no name is given). If the Xobject does not yet exist, then a new object with that name is created. The Xspecial name of "." means the currently edited object, and the special name of X".." means the last object previously edited. The ';objects' command will Xdisplay data about all objects. X XCells can be copied or moved between objects. This allows you to make backups Xof an object, or split up and edit the parts of a single object. The ';copy' Xcommand copies the current object to another object. The ';insert' command Xinserts another object into the current object. This is done in such as way Xthat the two object's cursor locations match. X XWhen a new object is created or an old object is zeroed, its scaling factor Xand its display frequency are initialized to useful default values. You can Xuse the ';default' command to change these default values. Use ';default Xscale' to change the default scaling factor, and use ';default frequency' Xto change the default display frequency. These parameter names can be Xabbreviated. X XThe 's' command with an argument sets the scale factor for the current object Xbeing viewed as desired, and centers the view on the current position of the Xcursor. Without an argument, 's' simply centers the view without changing the Xscale factor. X XThe 'S' command does auto-scaling, which selects the smallest positive scale Xfactor which will enabling viewing of the whole object. As the object grows, Xthe scaling factor will be increased automatically to keep the complete object Xin view. Using 's' will disable auto-scaling again. X XThe ';read filename' command reads in a command file, or else a description Xof a Life object in either a subset of the xlife format or in a rle format. XThe read command automatically distinguishes these three different formats Xdepending on the first character of the file. X XCommand files can execute any of the life program's commands, but normally Xcontain a picture of an object to be inserted. Thus for small objects, you Xcan simply create a picture of an object in an editor, and then the object Xcan be read in by the life program. Here spaces or periods represent OFF Xcells, and 'O, 'o', or '*' characters represent ON cells. Lines beginning Xwith '!' are ignored, so that you can comment your objects. Command files Xmust begin with a '!' character. X XThe xlife format is a list of coordinates of live cells, which are generated Xby the well-known xlife program. (Indirect files are not supported.) Files Xwhich begin with a '#' character are assumed to be in xlife format. X XThe rle format is a "run-length encoded" format which is a very good compact Xstorage format for objects. This is the smallest storage format for large Xobjects, but has the disadvantage that there is no other information stored Xin the file about an object other than its actual cells. Files which begin Xwith a 'x' character are assumed to be in rle format. X XAs a convenience, when the life program is started, you can specify a filename Xon the command line which will be read before any commands are read from the Xterminal. This is useful when you want to immediately read a Life object Xfrom a library. X XWhen reading an input file, the program looks for six different file names in Xsequence. It starts by looking for the file name as given. Then it looks for Xthe name with an '.l' extension appended. Then, if the environment variable XLIFEOPTS is defined and contains the -l option, then it looks in specified Xdirectory for the file, and then for the file with the '.l' extension. XFinally, it looks in /usr/games/lib/life for the file, and then for the file Xwith the '.l' extension. Thus there is a standard library of interesting XLife objects, and you can create your own Life library. X XThe ';list' command will display a list of those file with '.l' extensions Xthat can be read in. If given an argument, then only those path names which Xcontain the specified string will be listed. For the library directories, X';list' will show the Life files within several levels of subdirectories. XFor example, ';list gun/' will list all the Life files within a directory Xcalled 'gun'. X XThe command ';write filename' is used to save the current object to a file. XWhen writing an object to a file, what is usually written is a sequence of Xcommands which regenerates the object. The choice of commands is such that Xfor small objects, the commands look like a picture of the object. Thus, Xthe object is written using the commands '.' (to move right), 'o' (to insert Xcells), and '\n' (to move to the next line). (Periods are used instead of Xspaces so that you can count the spaces between live cells easily.) When Xwriting out an object, if it is very wide or long, the output will contain Xrepeat counts as necessary in order to compress the resulting file. X XThe object can alternatively be written out in the rle or xlife formats. XThis is done using the '-xlife' or '-rle' options in the ';write' command. XThe options can be abbreviated. For example, ';write -r it.l' will write Xthe current object to 'it.l' in rle format. SHAR_EOF echo "End of part 15" echo "File life/life.doc is continued in part 16" echo "16" > shar3_seq_.tmp exit 0
This archive was generated by hypermail 2.1.7 : Tue Oct 14 2003 - 21:44:09 UTC