home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / cellsim / v2_5 / doc / quick.doc < prev    next >
Encoding:
Text File  |  1990-02-26  |  7.5 KB  |  157 lines

  1.            ****************************************
  2.   quick.doc -- a very brief and simple example of using Cellsim v2.5
  3.  
  4. Note that this file is targeted primarily for an audience running Cellsim
  5. on a color Sun.  If you're using a monochrome machine, you'll suffer in
  6. two ways: 1) the display will not be as rich/meaningful (it will be more
  7. difficult to represent the information in the array), and 2) the display
  8. will be very very slow, compared to a color workstation.
  9.  
  10. In particular, the "heat.m256" rule is pretty bad to look at (as are most
  11. 256-state rules) when you're running on a black&white machine.
  12.  
  13.   This file is just a very simple example of how to start up Cellsim, load
  14. in a rule and image, and run; it is intended for those who have never used
  15. any version of Cellsim before.
  16.  
  17.   We'll go through two parts in our example:  a lookup-table rule on the
  18. Sun, and a computed-function rule on the Sun.  For the lookup-table parts,
  19. we'll use the "life.m2" rule, which is Conway's game of Life.  For the
  20. computed-function part, we'll use the heat-diffusion rule.
  21.  
  22.   First, start up Cellsim, by typing "cell.sun4" (or "cell.sun3", depending
  23. on what type of machine you're using).  This will bring up the simulator,
  24. using the default size of 64x64 and the 8-state vonNeumann neighborhood.
  25.  
  26.   Click the left mouse-button on the "Rules" button in the control-panel.
  27. This will tell Cellsim you want to load a rule.  You will be prompted for
  28. the name of the rule to load, in a small popup window in the control panel.
  29. Type "life.m2" and press return.  By default, Cellsim will automatically
  30. switch into the 2-state Moore neighborhood, when it sees the ".m2" filename
  31. extension.  You should see some messages flash by, and finally should see
  32. something like "life.m2.Z loaded".  If you see the message "no such t-file",
  33. then Cellsim was not compiled with the appropriate defaults for the various
  34. directories it needs.  You should re-read the "Installation" file to make
  35. sure you followed all of the instructions.
  36.  
  37.   Now that you've loaded the rule, you need an image to run it on.  Press
  38. the right mouse-button on the "Draw" button in the control-panel, and hold
  39. it down.  That should bring up a menu, from which you can select an item.
  40. Select "quick random" by releasing the mouse-button over that item.  (Note
  41. that since pressing the left mouse-button selects the first item in a menu,
  42. you could have just pressed the left mouse-button over the "Draw" button.
  43. We used the right mouse-button instead so you could become familiar with
  44. the menu structure).  This should draw a random image in the large display
  45. canvas of Cellsim.
  46.  
  47.   Finally, click the "Run" button with the left mouse-button, and you should
  48. see life run!  You can click the left mouse-button again, anywhere within
  49. the Cellsim window, to stop running.  You can try other things, such as
  50. using the "zoom in", "zoom out", and "zoom" buttons, to see the effect of
  51. different magnifications on the update-speed.  If things start to calm down
  52. in the array, you can help them along by "drawing" new active cells in the
  53. array.  To do that, stop running (by hitting the left mouse-button), and move
  54. the mouse out into the array area.  Next, hold down the left mouse-button
  55. and move the mouse around -- you should see a trail of active cells left
  56. behind.  You can use the middle mouse-button to erase active cells.  When
  57. you have an image you like, you can start running again.
  58.  
  59.   Next, let's run a 256-state computed-function rule.  To load the rule,
  60. once again hit the "Rules" button with the left mouse-button.  Enter
  61. "heat.m256.sun4.o" (or ".sun3.o") as the name of the rule to load.  You
  62. should see some messages about linking, and finally should see a message
  63. indicating success.  Cellsim will automatically switch into the 256-state
  64. Moore neighorhood when it sees the filename extension ".m256".  Now, this
  65. rule looks better with a rainbow colormap, so let's load that:  hit the left
  66. mouse-button over the "Color" button in the control-panel.  When it prompts
  67. you for a filename, enter "rainbow256.cmap" and press return.  The rest of
  68. the windows on your sun will probably turn purple or some other color when
  69. you do this.
  70.  
  71.   The "heat.64x" image is a good starting-image for this rule, so click the
  72. left mouse-button on the "Image" button in the control panel, and enter
  73. "heat.64x" as the filename.  You should see a picture of an irregular blob
  74. in a uniform background.  If you hit "run" now, you should see the system
  75. evolve.  Let it run for at least a few hundred time-steps to see things
  76. really start happening.
  77.  
  78.   Another interesting starting configuration is a symmetric block.  You can
  79. construct a symmetric initial configuration in just a few steps.  First, hit
  80. the left mouse-button on the "Clear" button in the control-panel, to clear
  81. the array.  Then, select the "Invert" item from the "Planes" menu, using
  82. the right mouse-button.  When it asks you for a plane mask, enter "0xe0"
  83. (a hexadecimal number, this is 240 in decimal).  That will set the entire
  84. array to a uniform value of 240.  Next, you want to punch a symmetric hole
  85. in this image.  Hit the left mouse-button on "Set", and then select
  86. "general random" from the "draw" menu.  This will let you set the parameters
  87. for the general-random routine.  You'll be prompted for several things:
  88. the origin and size of the rectangle to alter; the percentage of cells to
  89. change; and the minimum and maximum values to give the cells.  You can
  90. experiment here, but to get something symmetric you might use:
  91.  origin:  25 25
  92.  size:  15 15
  93.  percentage: 100
  94.  min, max: 0 0
  95. This says to make a 15x15 square, with its upper-left corner at (25,25).
  96. Change 100% (all) of the cells, and give them a value between 0 and 0
  97. (so just set them to 0).
  98.  
  99.   That sets the paremeters for general draw.  Now, just select "general draw"
  100. again, without hitting the "Set" button, and those paremeters will be used
  101. to draw a square in the array.  Now, you can hit the "run" button again.
  102.  
  103. You can exit Cellsim by pressing the left mouse-button on the "quit" button
  104. in the control panel.
  105.  
  106. Feel free to experiment with the various features in Cellsim.  You probably
  107. can't do any damage, except if you try to save a file and overwrite something
  108. (but Cellsim will ask you if you really want to overwrite files).  Try
  109. loading some of the other rules and images that are supplied, to get a feel
  110. for things.
  111.  
  112.  
  113.  
  114. /*
  115.  *
  116.  * Cellsim copyright 1989, 1990 by Chris Langton and Dave Hiebeler
  117.  * (cgl@lanl.gov, hiebeler@heretic.lanl.gov)
  118.  *
  119.  * This package may be freely distributed, as long as you don't:
  120.  * - remove this notice
  121.  * - try to make money by doing so
  122.  * - prevent others from copying it freely
  123.  * - distribute modified versions without clearly documenting your changes
  124.  *   and notifying us
  125.  *
  126.  * Please contact either of the authors listed above if you have questions
  127.  * or feel an exception to any of the above restrictions is in order.
  128.  *
  129.  * If you make changes to the code, or have suggestions for changes,
  130.  * let us know!  If we use your suggestion, you will receive full credit
  131.  * of course.
  132.  */
  133.  
  134. /*****
  135.  * Cellsim history:
  136.  *
  137.  * Cellsim was originally written on Apollo workstations by Chris Langton.
  138.  *
  139.  * Sun versions:
  140.  *
  141.  * - version 1.0
  142.  *   by C. Ferenbaugh and C. Langton
  143.  *   released 09/02/88
  144.  *
  145.  * - version 1.5
  146.  *   by Dave Hiebeler and C. Langton  May - June 1989
  147.  *   released 07/03/89
  148.  *
  149.  * - version 2.0
  150.  *   by Dave Hiebeler and C. Langton  July - August 1989
  151.  *   never officially released (unofficially released 09/08/89)
  152.  *
  153.  * - version 2.5
  154.  *   by Dave Hiebeler and C. Langton  September '89 - February 1990
  155.  *   released 02/26/90
  156.  *****/
  157.