One more gitweb-related formatting change to example config file.
[screensavers] / hacks / WolframAutomata / README.md
index 6bbd56a..67e7136 100644 (file)
@@ -84,12 +84,30 @@ are re-randomized every time the simulation is reset, such as after a
 simulation completes or after resizing the window.
 
 
 simulation completes or after resizing the window.
 
 
+CLI: Rule Selection
+-------------------
+
+If neither of the following two options are passed, rules are randomly selected
+from `curated_ruleset_list[]` in `WolframAutomata.c`.
+
+  - **`-true-random-rule`**: Select a rule completely at random, NOT randomly
+    from a curated list. Note that many rules are visually uninteresting.
+
+  - **`-rule N`**: Select a specific rule where `N` is a Wolfram number. Values
+    from 0-255 inclusive are valid.
+
+
 CLI: Simulation Seed
 --------------------
 
 CLI: Simulation Seed
 --------------------
 
-If none of the following options are specified, the starting seed will contain
-randomly interspersed active/inactive cells at a 30/70, 50/50, or 70/30 ratio,
-itself also randomly selected.
+The following seed related CLI flags apply only when using the
+`-true-random-rule` or `-rule N` flags. Without these flags, the program draws
+rules from `curated_ruleset_list[]` which also includes curated seeds, all of
+which override any seed related CLI flags.
+
+If the curated rule list is not in use and none of the following options are
+specified, the starting seed will contain randomly interspersed active/inactive
+cells at a 30/70, 50/50, or 70/30 ratio, itself also randomly selected.
 
   - **`-seed-left`**: Seeds a single active cell on the left side of the
     display. All other cells are inactive.
 
   - **`-seed-left`**: Seeds a single active cell on the left side of the
     display. All other cells are inactive.
@@ -101,17 +119,22 @@ itself also randomly selected.
   - **`-seed-density N`**: Generates random seed with `N` percent active cells.
 
 
   - **`-seed-density N`**: Generates random seed with `N` percent active cells.
 
 
-CLI: Rule Selection
--------------------
+CLI: Simulation Length
+----------------------
 
 
-If neither of the following two options are passed, rules are randomly selected
-from `curated_ruleset_list[]` in `WolframAutomata.c`.
+If neither of the following two options are passed, the simulation runs as
+though `-length 5000` was passed.
 
 
-  - **`-true-random-rule`**: Select a rule completely at random, NOT randomly
-    from a curated list. Note that many rules are visually uninteresting.
+  - **`-random-length`**: A random length smaller than 10,000 generations but
+    large enough to fill the screen is selected.
 
 
-  - **`-rule N`**: Select a specific rule where `N` is a Wolfram number. Values
-    from 0-255 inclusive are valid.
+  - **`-length N`**: Request `N` generations be simulated on each run.
+
+Note that an upper limit of 10,000 generations is enforced in order to avoid
+`BadAlloc` errors from some X servers.  For more details, read
+`WolframAutomata.c` starting around the comment, "The maximum number of
+generations is cell_size dependent. This is a soft limit and may be increased
+if ..."
 
 
 CLI: Simulation Speed
 
 
 CLI: Simulation Speed
@@ -131,24 +154,6 @@ though `-delay 25000` was passed.
     well respected.
 
 
     well respected.
 
 
-CLI: Simulation Length
-----------------------
-
-If neither of the following two options are passed, the simulation runs as
-thought `-length 5000` was passed.
-
-  - **`-random-length`**: A random length smaller than 10,000 generations but
-    large enough to fill the screen is selected.
-
-  - **`-length N`**: Request `N` generations be simulated on each run.
-
-Note that an upper limit of 10,000 generations is enforced in order to avoid
-`BadAlloc` errors from some X servers.  For more details, read
-`WolframAutomata.c` starting around the comment, "The maximum number of
-generations is cell_size dependent. This is a soft limit and may be increased
-if ..."
-
-
 CLI: Cell Dimensions
 --------------------
 
 CLI: Cell Dimensions
 --------------------
 
@@ -220,15 +225,59 @@ example, with prerequisite steps spelled out:
     git clone git://git.subgeniuskitty.com/screensavers
     cd screensavers/hacks/WolframAutomata
     make clean all
     git clone git://git.subgeniuskitty.com/screensavers
     cd screensavers/hacks/WolframAutomata
     make clean all
-    cp WolframAutomata /usr/local/bin/xscreensaver-hacks/
+    cp WolframAutomata /usr/local/bin/xscreensaver-hacks/wolframautomata
 
 
-Now create the file `WolframAutomata.xml` wherever your system stores
+Now create the file `wolframautomata.xml` wherever your system stores
 XScreensaver config files and populate it with the contents shown below. For
 example, on FreeBSD:
 
 XScreensaver config files and populate it with the contents shown below. For
 example, on FreeBSD:
 
-    vi /usr/local/share/xscreensaver/config/WolframAutomata.xml
-
-    TODO: Finish writing this file after the command line options are finalized.
+    vi /usr/local/share/xscreensaver/config/wolframautomata.xml
+
+    <?xml version="1.0" encoding="ISO-8859-1"?>
+    
+    <screensaver name="wolframautomata" _label="WolframAutomata">
+    
+      <command arg="-root"/>
+    
+      <string  id="rule_number"   _label="Rule number: "      arg="-rule %" />
+      <boolean id="rnd_rule"      _label="Random rule"        arg-set="-random-rule" />
+    
+      <string  id="seed_density"  _label="Seed density (%):"  arg="-seed-density %" />
+      <boolean id="seed_left"     _label="Seed left"          arg-set="-seed-left" />
+      <boolean id="seed_center"   _label="Seed center"        arg-set="-seed-center" />
+      <boolean id="seed_right"    _label="Seed right"         arg-set="-seed-right" />
+    
+      <string  id="length"        _label="Length (gen):"      arg="-length %" />
+      <boolean id="rnd_length"    _label="Random length"      arg-set="-random-length" />
+    
+      <string  id="delay"         _label="Delay (usec):"      arg="-delay %" />
+      <boolean id="rnd_delay"     _label="Random delay"       arg-set="-random-delay" />
+    
+      <string  id="cell_size"     _label="Cell size (px):"    arg="-cell-size %" />
+      <boolean id="rnd_cellsize"  _label="Random cell size"   arg-set="-random-cell-size" />
+    
+      <string  id="color_index"   _label="Color index (int):" arg="-color-index %" />
+    
+      <string  id="admiration"    _label="Admiration (sec):"  arg="-admiration-delay %" />
+    
+      <_description>
+    Displays the time evolution of elementary cellular automata.
+    
+    These automata consist of a line of cells, each of which may be either on or
+    off. To ensure every cell has neighbors, the two endpoints of the line connect
+    together, thereby forming a circular universe for the cells to inhabit. This
+    line is drawn horizontally on the screen.
+    
+    Over time, this line of cells evolves according to rules, with some cells
+    switching on or off. Each new iteration is drawn below its predecessor,
+    leading the screen to scroll vertically over time.
+    
+    The rules which govern the time evolution of this system depend only on the
+    current state of a given cell and the state of its two immediate neighbors.
+    These rules are formalized as Wolfram codes, where the code number is directly
+    convertible into a rule set.
+      </_description>
+    </screensaver>
 
 The next step integrates WolframAutomata into an individual user's XScreensaver
 config via the file `~/.xscreensaver`. If preferred, it could instead be done
 
 The next step integrates WolframAutomata into an individual user's XScreensaver
 config via the file `~/.xscreensaver`. If preferred, it could instead be done
@@ -249,7 +298,7 @@ demonstrated.
                                     xplanet -vroot -wait 1 -timewarp 400          \
                                       -label -origin moon                       \n\
       GL:                           fireflies -root                             \n\
                                     xplanet -vroot -wait 1 -timewarp 400          \
                                       -label -origin moon                       \n\
       GL:                           fireflies -root                             \n\
-                                    WolframAutomata -root                       \n\
+                                    wolframautomata -root                       \n\
                                     blitspin -root                              \n\
     <snip>
 
                                     blitspin -root                              \n\
     <snip>