home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / EXAMPLES / FLOWERS.DOC < prev    next >
Text File  |  1996-06-04  |  5KB  |  97 lines

  1.        
  2.  
  3.                  DRAWING FLOWERS WITH REWRITE SYSTEMS                      
  4.                                                                              
  5.                                                                              
  6.  NAME:                                                                 
  7.      
  8.  flowers: a program that lets you draw floral compositions
  9.  
  10.  This program is  based on the following book:                               
  11.                                                                              
  12.                THE ALGORITHMIC BEAUTY OF PLANTS                              
  13.                                                                              
  14.      by Przemyslaw Prusinkiewicz and Aristid Lindenmayer                     
  15.                 (Springer Verlag,1990)                                       
  16.                                                                              
  17.  This book shows how the growth and shape of plants may be modeled using     
  18.  rewrite systems called Lindenmayer Systems (L-systems for short), and     
  19.  how these systems can be used to generate images.                           
  20.                                                                              
  21.  The kind of flowers that can be drawn with this program are obtained with a
  22.  variant of one of the grammars of this book.
  23.  
  24.  
  25.  USAGE
  26.  
  27.  To start this program, just type 
  28.    > load("flowers") ?
  29.    > main ?                                     
  30.                   
  31.  After a while, a panel of 5 buttons appears.
  32.  
  33.  1- Drawing Init
  34.     Clicking on Drawing Init causes a panel to appear, containing the drawing
  35.     parameters.
  36.     X and Y are the coordinates of the starting point of the flower in the
  37.       window (in pixels); They may also be set by clicking in the drawing pad
  38.       when no drawing is being performed (see 4- Draw). The origin of the
  39.       window is its upper left corner. The X axis is left-right, the Y axis is
  40.       top-down. The Z axis goes inside the screen.
  41.     ax, ay, az are the next starting angle values: they correspond to rotations
  42.       of the initial turtle around the X,Y and Z axises (in degrees).
  43.     Complexity is an integer between 2 and 8: The higher this number, the more
  44.       complex the flower drawn. This numbers corresponds to the number of
  45.       derivations in the rewrite system. Adding 1 to the complexity makes the
  46.       flower about twice bigger. 
  47.     Zoom: It may be necessary to adjust the zoom factor if the complexity is
  48.       changed. 
  49.  
  50.  2- Palette
  51.     Clicking on Palette makes a new panel appear, with a color palette and
  52.     buttons describing the parts of the flower whose colors can be modified. 
  53.     Once one of these parts has been chosen, clicking on a new color makes its
  54.     color change immediately. 
  55.     The colors of the different parts of a flower in the process of being
  56.     drawn are always consistent with the colors shown in the palette.
  57.  
  58.  3- PostScript Output
  59.     Clicking on PostScript Output lets the user save the current drawing in a
  60.     PostScript file.
  61.  
  62.  4- Draw
  63.     Clicking on draw makes the drawing pad appear, and a flower being drawn.
  64.     Clicking in the drawing pad during the drawing makes it stop. 
  65.     Clicking in the drawing pad when no drawing is being performed sets the
  66.     starting point of the next flower to be drawn.
  67.  
  68.  5- Quit
  69.     Causes the program to stop.   
  70.  
  71.  
  72.  FILES 
  73.  
  74.  The flowers.lf file contains the definition of the user interface and the
  75.  definition of the L-System used to draw the flowers.
  76.                                                                              
  77.  The other files are:                                                        
  78.  - flo_utils.lf : contains a number of utilities.                            
  79.  - flo_gram.lf  : contains the L-Systems translator and the predefined       
  80.                   symbols definitions                                        
  81.  - flo_xtools.lf: contains all the xToolkit: definition of button types,...  
  82.  - flo_custom.lf: contains all the customizable stuff: look of the interface,
  83.                   default values for the flowers.                            
  84.                                                                              
  85.                                                                              
  86.  flowers.lf is the main file of the demo. All the other files are 
  87.  automatically loaded if they are in the same directory. 
  88.                                                                              
  89.  
  90.  
  91.  AUTHOR 
  92.  
  93.  Bruno Dumant          
  94.  
  95.  Copyright 1992 Digital Equipment Corporation
  96.  All Rights Reserved
  97.