home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Raytrace & Morphing / SOS-RAYTRACE.ISO / programm / utility / dos / glob10 / glob10.doc < prev    next >
Encoding:
Text File  |  1993-09-02  |  6.8 KB  |  167 lines

  1.  
  2.  
  3. Triangular Glob Generator v1.0
  4. copyright 1993, Dov Sherman
  5.  
  6. (For use with Stephen Coy's Vivid Raytracer v1.0 or higher)
  7.  
  8. -----------------------------------------------------------------------
  9.  
  10. GLOB is freely distributable.   The author authorizes the distribution
  11.   on this program over BBS's, networks, magnetic media, and any other
  12.   forms I haven't thought of.  The distributor may not charge more than
  13.   $5 US for this software.
  14.  
  15. GLOB may not be included in any commercial package without the explicit
  16.   written consent of the author.
  17.  
  18. Any distribution of this package must contain:
  19.  
  20.       GLOB10.EXE --- The executable
  21.       GLOB10.DOC --- This file
  22.        EXAMPLE.G --- An example GLOB input file
  23.        EXAMPLE.V --- A Vivid studio file for the ouput from EXAMPLE.G
  24.      EXAMPLE.GIF --- The eventual GIF result of EXAMPLE.G
  25.  
  26. The author makes no guarantees or warranties with this program and
  27.   claims no responsibility from damage or loss of time through the use
  28.   of this program.
  29.  
  30. No fee is due for the personal use of this program but I would like to
  31.   see some examples of raytracings others do using this software.  Also,
  32.   if you really want to, you can send a few bucks to me at:
  33.  
  34.                 Dov Sherman
  35.                 316 East King Street
  36.                 Boone, NC 28608
  37.  
  38. Suggestions, questions, bug reports, and lavish praise should be
  39.   sent to the above address.  I can also be reached by Internet
  40.   at DS5877@Stat.Appstate.Edu.
  41.  
  42. -----------------------------------------------------------------------
  43.  
  44. GLOB is a handy utility for creating more realistic, rounded objects
  45.   without relying on bezier patches (which are still good but hard to
  46.   work out on paper).
  47.  
  48. GLOB takes an ASCii file containing the coordinates and radii of a
  49.   series of spheres and creates smooth connections between each
  50.   sequential pair, connecting the first and third spheres in each
  51.   sequential triple, and placing a triangular polygon over the gap
  52.   created by a sequential triple.  I'll try to explain this better
  53.   later.
  54.  
  55. The output is in the form of an include file for Stephen Coy's Vivid
  56.   Raytracer.  Other raytracer formats may be supported in future
  57.   versions if I ever manage to figure out the other ones.
  58.  
  59. -----------------------------------------------------------------------
  60.  
  61. Let's start by looking at an example from an input file.  An input file
  62.   is made up a series of numbers in groups of four in the form x y z r.
  63.   For example, to describe a sphere at (-4, 0, -4) with a radius of 4,
  64.   the appropriate form would be
  65.  
  66. -4 0 -4 4
  67.  
  68. If the lines directly preceding and following the sphere definition are
  69.   not sphere definitions, the sphere will be alone.  If the definition
  70.   is followed by one additional sphere definition, as in:
  71.  
  72. -4 0 -4 4
  73. 2 5 -3 3
  74.  
  75. Both spheres are printed with an additional cone connecting at
  76.   tangential points to the spheres to create an oblong capsule shape.
  77.   If one of the spheres has a radius of zero, that sphere will not be
  78.   printed but the cone will be printed as connecting at a tangential
  79.   point on the remaining sphere with a sharp point on the other end,
  80.   like a buoy.
  81.  
  82. But the really nice feature is when three sphere definitions appear in
  83.   sequence, as in:
  84.  
  85. -4 0 -4 4
  86. 2 5 -3 3
  87. 1 -8 -2 2
  88.  
  89. When three sphere definitions appear in sequence, the second and third
  90.   spheres are connected by a cone, then the first and third are
  91.   connected by a cone, then a triangular polygon is placed over the hole
  92.   remaining in the triangle made by the spheres and cones.  This creates
  93.   a triangular glob shape.
  94.  
  95. You can use groups of these globs to create rounded objects based
  96.   on groups of key spheres.
  97.  
  98. When you run the program, it will created three extra files named
  99.   oldsphr.$$$, oldcones.$$$, and oldtri.$$$ in which past spheres,
  100.   cones, and triangles are stored.  Each time a sphere, cone, or
  101.   triangle comes up, it is checked against those stored in these files.
  102.   In this way, no sphere, cone, or triangle is printed more than once.
  103.  
  104. -----------------------------------------------------------------------
  105.  
  106. Command line format:
  107. glob <input file> [<output file>] [<switches>]
  108.    output file defaults to input file with .vo extension
  109.    valid switches are:
  110.        /sx:n       Scale-X = N
  111.        /sy:n       Scale-Y = N
  112.        /sz:n       Scale-Z = N
  113.        /sr:n   Scale-Radius = N
  114.        /ox:n      Offset-X = N
  115.        /oy:n      Offset-Y = N
  116.        /oz:n      Offset-Z = N
  117.        /or:n   Offset-Radius = N
  118.        /d[:file]  Turns on definition file with optional
  119.                naming of the file which defaults to
  120.                output file name with .def extension
  121.        /v     Turns on EGA 640x350x16 on-screen graphing
  122.  
  123.  
  124. Using the /s* switches causes input from the input file to be scaled in
  125.   the given dimension by that number before processing.
  126.  
  127. Using the /o* switches causes input from the input file to be offset in
  128.   the given dimension by that number before processing.
  129.  
  130. Using the /d switch causes a second output file to be created which will
  131.   contain the #define calls to define the values for sphere, cone, and
  132.   triangle definitions in the main output file.  In the input file, you
  133.   name the define name for a group on primitives by placing the name on
  134.   a line by itself prepended by a pound sign (#).  For example, if you
  135.   wanted the definition name to be "face", you would have a line saying:
  136.  
  137. #face
  138.  
  139. Each successive definition will be named face1, face2, face3, face4 and
  140.   so on.  You can change the definition name to be used by simply naming
  141.   it again on another line.  If, at some later point, you change back to
  142.   the first definition name, the suffix numbers will continue to
  143.   increment after the last suffix from the previous use.  If you place a
  144.   pound sign (#) on a line by itself with no name after it, it will stop
  145.   definition use until the next definition definition.
  146.  
  147. Of course, all pound sign functions are ignored unless the /d switch is
  148.   used at the command-line.
  149.  
  150. Using the /v switch will turn on EGA 640x350x16 on-screen graphing of
  151.   the spheres, cones, and triangles as they are processed.  This helps
  152.   you spot when you've put a sphere in the wrong location.  If you don't
  153.   have EGA, don't use this switch.  Other graphic modes may be supported
  154.   in future versions.
  155.  
  156. -----------------------------------------------------------------------
  157.  
  158. Take a look at the example input file example.g.  If you were to run it
  159.   through GLOB with the /d option on to create output files example.vo
  160.   and example.def and then use Vivid to process example.v (which
  161.   #includes example.vo and example.def), the result would be the
  162.   included example.gif.
  163.  
  164. -----------------------------------------------------------------------
  165. Triangular Glob Generator v1.0, copyright 1993, Dov Sherman
  166.  
  167.