home *** CD-ROM | disk | FTP | other *** search
/ Current Shareware 1994 January / SHAR194.ISO / graphuti / frgen14.zip / FRGEN.DOC < prev    next >
Text File  |  1993-10-03  |  10KB  |  209 lines

  1.                    Fractal Landscape Generator v1.4
  2.                     Copyright (c) 1993 Steve Anger
  3.                  This program is freely distributable
  4.  
  5.   FRGEN is a utility to generate fractal landscapes and other shapes
  6. using successive triangle sub-division. The fractal data can be output
  7. as POV-Ray or Vivid scene files or as raw triangle data. FRGEN only
  8. generates flat faceted triangles. To produce smoothed fractals you
  9. can output the fractal to RAW format and then run the data through the
  10. programs Sandpaper (Vivid, MTV, Rayshade) or raw2pov (POV-Ray).
  11.  
  12. POV-Ray users! Since POV-Ray 2.0 has now been released to the public the
  13. default output format has been changed to POV-Ray 2.0. If you're still
  14. using POV-Ray 1.0 you can still generate 1.0 compatible files by using
  15. the -op1 switch.
  16.  
  17.  
  18. Operation:
  19.  
  20. Usage: frgen infile[.fr] [outfile] [options]
  21.  
  22. Options (yikes!)
  23.          -sxnnn   Scale noise in x direction by nnn (0.0 - 1.0)
  24.          -synnn     '     '    ' y     '      '  '     '     '
  25.          -sznnn     '     '    ' z     '      '  '     '     '
  26.          -snnn    Scale noise in x, y, and z directions by nnn
  27.  
  28.          -bxnnn   Bias noise in  x direction by nnn (-1.0 - 1.0)
  29.          -bynnn     '    '    '  y     '      '  '     '     '
  30.          -bznnn     '    '    '  z     '      '  '     '     '
  31.          -bnnn    Bias noise in x, y, and z directions by nnn
  32.  
  33.          -fxnnn   Set noise falloff factor in x direction to nnn (0.0 - 1.0)
  34.          -fynnn     '    '     '      '     ' y     '     '   '    '     '
  35.          -fznnn     '    '     '      '     ' z     '     '   '    '     '
  36.          -fnnn    Set noise falloff factor in x, y, and z directions to nnn
  37.  
  38.          -vxnnn   Set view_point x coord to nnn
  39.          -vynnn    '      '      y   '    '  '
  40.          -vznnn    '      '      z   '    '  '
  41.  
  42.          -lxnnn   Set look_at x coord to nnn
  43.          -lynnn    '     '    y   '    '  '
  44.          -lznnn    '     '    z   '    '  '
  45.  
  46.          -ennn    Use nnn as seed for random number generator
  47.          -rnnn    Maximum recursion depth of nnn
  48.          -d       Preview generated fractal on screen
  49.          -x       Exchange Y and Z coordinates on output
  50.  
  51.          -op      Output to POV-Ray 2.0 format (default)
  52.          -op1     Output to POV-Ray 1.0 format
  53.          -ov      Output to Vivid format
  54.          -or      Output to RAW triangle format
  55.          -on      Null output. For quick preview.
  56.  
  57. Examples:
  58.  
  59.   // Generate a mountain with display preview and output to POV-Ray 2.0
  60.   frgen mountain -d
  61.  
  62.   // Generate some rolling hills with preview and output to Vivid
  63.   frgen hills -d -ov
  64.  
  65.   // Generate a mountain with preview only (no output)
  66.   frgen mountain -d -on
  67.  
  68.   // Generate a flatten out rocky terrain (no upward bias) with RAW output
  69.   frgen mountain -d -or -by0.0
  70.  
  71.   // Generate a smooth valley (negative upward bias) with RAW output
  72.   frgen hills -d -or -by-0.5
  73.  
  74.  
  75. infile[.fr]    This is the file which contains the basic specifications
  76.                for the fractal. The first non-comment line of this file
  77.                is a list of default options for this fractal (comment
  78.                lines begin with a semi-colon). This line must be
  79.                present. The rest of the file contains a list of
  80.                coordinates for the triangles making up the base from
  81.                which the fractal grows. The coords of the triangles are
  82.                specified one per line in the following format:
  83.  
  84.                 ax ay az  bx by bz  cx cy cz  [fix_ab  fix_bc  fix_ca]
  85.  
  86.                The numbers ax, ay, etc. are the x,y,z coordinates of the
  87.                three vertices of the triangles. The three optional
  88.                numbers fix_ab, fix_bc, and fix_ca can be either 1 or 0
  89.                and specify  whether that edge of the triangle is forced
  90.                to stay within the plane of the triangle or allowed to
  91.                move freely (1 = fixed, 0 = free). The most common use
  92.                for 'fixed' edges is to force the outer edges of a
  93.                mountain base to stay on the ground. If not specified,
  94.                edges are assumed to be free.
  95.  
  96.                e.g.
  97.                     ; The default options are on the following line
  98.                     -sx0.1 -sy0.2 -sz0.1 -by0.5 -r4 -vx10 -vy5 -vz-10
  99.                     ; Two triangles in the x-z plane making up the base 
  100.                     ; of a mountain
  101.                     +10.0 0.0 0.0   0.0 0.0 +10.0  -10.0 0.0 0.0  1 1 0
  102.                     -10.0 0.0 0.0   0.0 0.0 -10.0  +10.0 0.0 0.0  1 1 0
  103.  
  104.                Several sample input files are included:
  105.                box.fr      - A simple box.
  106.                diamond.fr  - A diamond shape.
  107.                hills.fr    - Some rolling hills.
  108.                mountain.fr - Square based mountain.
  109.                plain.fr    - A rolling plain.
  110.                sphere.fr   - A fractal rock or asteroid.
  111.  
  112. outfile[.ext]  Output file to be created. The extension added will
  113.                depend on the output format specified.
  114.  
  115. -sx -sy -sz    These three numbers specify the magnitude of the noise
  116.                that will be used to perturb the triangles. Setting a
  117.                scaling factor of 0.0 (-sx0 -sy0 -sz0) will generate a
  118.                fractal that is unchanged from the starting shape while
  119.                a scaling factor of 1.0 (-sx1.0 -sy1.0 -sz1.0) will
  120.                create extremely distorted shapes. Values in the range
  121.                0.05 to 0.25 usually work well. All three numbers can be
  122.                set to the same value by using -s. Default values are
  123.                -sx0.1 -sy0.1 -sz0.1
  124.  
  125. -bx -by -bz    These numbers specify the amount by which the noise is
  126.                biased in the corresponding x,y,z direction. A positive
  127.                value will cause the noise to tend to move in the
  128.                positive direction of  the axis while a negative value
  129.                will tend to move it in the opposite direction. e.g. If
  130.                start with a triangle in the x-z plane, a setting of
  131.                -bx0.0 -by0.5 -bz0.0 will cause the fractal to tend to
  132.                bulge upward creating a mountain-like shape. All three
  133.                numbers can be set to the same value by using -b. Default
  134.                values are -bx0.0 -by0.0 -bz0.0
  135.  
  136. -fx -fy -fz    These numbers specify the rate at which the perturbing
  137.                noise falls off as the subdivision continues. Values
  138.                slightly less than 1.0 (e.g. 0.8) will generate a surface
  139.                with a slightly weathered appearance. All three numbers can
  140.                be set to the same value by using -f. Default values are
  141.                -fx1.0 -fy1.0 -fz1.0
  142.  
  143. -vx -vy -vz    The x, y, and z coordinates of the viewpoint. Used for
  144.                screen preview only.
  145.  
  146. -lx -ly -lz    The x, y, and z coordinates of the point you are looking
  147.                at. Used for screen preview only.
  148.  
  149. -e             You can use this option if you want to manually specify
  150.                the seed used by the random number generator. This is
  151.                useful if you want to reproduce the same fractal more
  152.                than once but using different view points, numbers of
  153.                triangles, etc.
  154.  
  155. -r             This specifies the number of times to sub-divide the
  156.                triangles. Be careful when setting this number as the
  157.                number of triangles generated will increase by a factor
  158.                of 4 every time it is increased by 1. Default is -r3
  159.  
  160. -d             Turns the display preview on.
  161.  
  162. -x             This option causes the Y and Z coordinates to be switched 
  163.                when writing the output file. This is useful if your    
  164.                rendering package uses the Z axis as vertical instead of 
  165.                the Y axis.
  166.  
  167. -op            Selects POV-Ray 2.0 output format (default).
  168. -op1           Selects POV-Ray 1.0 output.
  169. -ov            Selects Vivid output format.
  170. -or            Selects raw triangle output format.
  171. -on            No output. If you're just experimenting and don't want to
  172.                generate a file just yet then this option will speed up the
  173.                display preview quite a bit.
  174.  
  175.  
  176. Revision History:
  177.  
  178. Changes in v1.4
  179. - null file output for quicker previews
  180. - added POV-Ray 2.0 output.
  181. - added noise falloff parameters
  182. - outputs to separate main file and include file
  183. - adds a camera and light source to the scene
  184.  
  185. Changes in v1.3
  186. - modified for POV-Ray 1.0 and Vivid 2.0 output format.
  187.  
  188. Changes in v1.2
  189. - replaced DKB output with POV-Ray output.
  190. - added Vivid and raw triangle output formats.
  191.  
  192. Changes in v1.1
  193. - you can now start the fractal generation from any arbitrarily
  194.   specified set of base triangles instead of the simple square base
  195.   which was used in v1.0. You can now generate fractal spheres, boxes,
  196.   specifically shaped mountain ranges, etc.
  197.  
  198. - the program will now create an efficient set of bounding shapes for
  199.   the huge number of triangles generated. Scenes generated with v1.1
  200.   will typically render 5 to 10 times faster than those generated with
  201.   v1.0
  202.  
  203. - the 3D projection is now much more accurate, plus you can specify the
  204.   view-point and look-at coordinates instead of just the viewing angle.
  205.  
  206.  
  207.                                               CompuServe: 70714,3113
  208.                                                YCCMR BBS: (708)358-5611
  209.