home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Screenblanker / GBlankM1.lha / GBlankerMod1 / Docs / Demons.doc < prev    next >
Encoding:
Text File  |  1995-01-24  |  2.6 KB  |  95 lines

  1.  
  2.                     GarshneBlanker modules collection 
  3.             ---------------------------------
  4.                                  volume I
  5.                  --------
  6.  
  7.                          version 1.0 (Jan 24 1995)
  8.  
  9.                   programs, sources and documentation are
  10.                       copyright 1995 Marzio De Biasi
  11.                             All Rights Reserved
  12.  
  13.  
  14.                               Demons blanker
  15.                               **************
  16.                                    v1.0
  17.                            technical information
  18.  
  19.  
  20. Description
  21. -----------
  22.  
  23.   This blanker is a N-states cellular automata, which follow this
  24.   simple rule:
  25.  
  26.    "at each generation, if a cell in state X is sourrounded by at least one
  27.     cell in state X+1, then it will change its state to X+1"
  28.  
  29.   The blanker begins with a chaotic configuration of cells ("rubble" phase);
  30.   the state of a cell is represented by its color.
  31.  
  32.   The first generations keep a chaotic aspect except for small "blobs" made
  33.   of color waves.
  34.   Whit time these blobs slowly grow and wrap up the chaotic cells ("drops"
  35.   phase).
  36.   Some generations after, the grid of cells has become a field of beautiful
  37.   spirals that slowly expand themself; only a few chaotic spots survive:
  38.   the DEMONS ("defects" phase).
  39.  
  40.   
  41.  
  42.  
  43. Garshneblanker preference window
  44. --------------------------------
  45.  
  46.   You can set the following parameters:
  47.  
  48.   Cells size    : the size of the grid cells
  49.   ----------
  50.  
  51.   Colors    : number of colors to be used; fewer colors usually
  52.   ------      means that the automata will reach the "defect" phase
  53.           in fewer generations.
  54.  
  55.   Width        : grid width
  56.   _____
  57.  
  58.  
  59.   Height    : grid height
  60.   ------ 
  61.  
  62.  
  63.   NOTE: in order to obtain a fast refresh, you must use small values for Width
  64.   and Height, but, if you are patient, try the highest resolution, set the
  65.   cells size to 1, and wait for the last phase.
  66.  
  67.  
  68.  
  69.  
  70. Algorithm description
  71. ---------------------
  72.  
  73.   NC        : screen colors        (NC = 2 ^ Screen_depth)  
  74.   COLOR(x,y)    : color of cell at (x,y)
  75.   COLOR'(x,y)   : next color of cell at (x,y)
  76.   GRID_W    : grid width        
  77.   GRID_H    : grid height    
  78.  
  79.   - for each generation do the following steps
  80.  
  81.       - for each cell at (i,j) do the following steps
  82.  
  83.     - c1 = COLOR((i + 1) mod GRID_W, j)
  84.     - c2 = COLOR((i - 1) mod GRID_W, j)
  85.     - c3 = COLOR(i, (j + 1) mod GRID_H)
  86.     - c4 = COLOR(i, (j - 1) mod GRID_H)
  87.     - if at least one among c1,c2,c3 and c4 equals (COLOR(i,j)+1) mod NC
  88.       then COLOR'(i,j) = (COLOR(i,j) + 1) mod NC
  89.       else COLOR'(i,j) = COLOR(i,j)
  90.  
  91.       - for each cell at (i,j) do the following steps
  92.  
  93.     - COLOR(i,j) = COLOR'(i,j)
  94.     - redraw cell at (i,j)
  95.