home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / graphic / dwb / ray.doc < prev    next >
Text File  |  1989-11-08  |  53KB  |  1,207 lines

  1.  
  2. ********************************************************************
  3. *                                                                  *
  4. *            Copyright (c) 1987, William T. Baldridge              *
  5. *                      All Rights Reserved                         *
  6. *                                                                  *
  7. * This file is part of DBW_Render                                  *
  8. *                                                                  *
  9. * DBW_Render is distributed in the hope that it will be useful,    *
  10. * but WITHOUT ANY WARRANTY. No author or distributor accepts       *
  11. * responsibility to anyone for the consequences of using it or for *
  12. * whether it serves any particular purpose or works at all, unless *
  13. * he says so in writing. Refer to the DBW_Render General Public    *
  14. * License for full details.                                        *
  15. *                                                                  *
  16. * Everyone is granted permission to copy, modify and redistribute  *
  17. * DBW_Render, but only under the conditions described in the       *
  18. * DBW_Render General Public License. A copy of this license is     *
  19. * supposed to have been given to you along with DBW_Render so you  *
  20. * can know your rights and responsibilities. It should be in a     *
  21. * file named COPYING. Among other things, the copyright notice and *
  22. * this notice must be preserved on all copies.                     *
  23. ********************************************************************
  24. *                                                                  *
  25. * This is the IBM-PC/XT/AT version of the DBW_Render documentation *
  26. * amended 10/31/89 by John H. Lowery                               *
  27. *                                                                  *
  28. ********************************************************************
  29.  
  30.  
  31.  
  32.  Sections
  33.  ~~~~~~~~
  34.     Announcement         - announcement of software availability
  35.     Included             - what's in the package
  36.     Under Development    - what's currently being written
  37.     Background Info      - what is this package?
  38.     Running RAY          - how to run the ray tracer
  39.     Running DISPLAY      - how to run the display program
  40.     Creating a .DAT file - what goes into the input file 
  41.     Source file info     - how to rebuild the package
  42.  
  43.  
  44.  Announcement
  45.  ~~~~~~~~~~~~
  46. If you liked the ray traced images previously distributed... you're 
  47. going to LOVE DBW_Render. This package is a FULL re-implementation 
  48. of the Ray Tracer that I've been using on VAXen to create all those 
  49. images.
  50.  
  51. It was developed to run on a standard Amiga, and will run on an IBM 
  52. (or compatible) PC, XT, AT or PS2 with 512k of memory, and a MCGA or 
  53. VGA display adapter (or compatible).  It will run (after a fashion) 
  54. without a math coprocessor, but performance is vastly improved with an
  55. 8087 or 80287.  By adding AI-heuristics, elapsed time to compute an 
  56. image is within the same order of magnitude as a VAX-780.  For example,
  57. "glass" computes (at 320x200 resolution, 256 colors) in 12 hours on a 
  58. 10 MHz AT compatible with an 80287. 
  59.  
  60.  
  61.  
  62.                                     -1-
  63.  
  64.  Included:
  65.  ~~~~~~~~~~~~
  66.      READ.ME     - Notes, latest changes, etc.
  67.      RAY.EXE     - ray tracing program
  68.      DISPLAY.EXE - general display program for RAY's output
  69.      *.DAT       - sample input files
  70.      *.TMP       - sample RAY output files
  71.      *.c         - all Microsoft C v5.1 sources for the package
  72.      *.h         - all Microsoft C include files for the package
  73.      RAY.DOC     - full documentation for the package
  74.      COPYING     - General License Agreement
  75.  
  76. Please read the General License Agreement (file: COPYING) before 
  77. proceeding.
  78.  
  79.  
  80.  Background Information
  81.  ~~~~~~~~~~~~~~~~~~~~~~
  82. The DBW_Render package uses an algorithm called Distributed Ray 
  83. Tracing.  In addition to neatly solving the hidden surface problem, 
  84. ray tracing (in general) affords the opportunity for doing excellent 
  85. (that is, highly realistic) shading and illumination calculations.
  86.  
  87. DBW_Render was originally written for the Amiga computer, but is now
  88. available for IBM-PC and PS/2 compatibles.  It is written in Microsoft 
  89. C (version 5.1) and runs on any IBM PC/XT/AT/PS2 system that is 
  90. equipped with an MCGA- or VGA-type display.  The IBM version of 
  91. DBW_Render is input-file compatible with the Amiga version (output 
  92. files are not compatible).
  93.  
  94. The RAY program knows how to create images composed of four primitive 
  95. geometric objects: spheres, parallelograms, triangles, and flat 
  96. circular rings (disks with holes in them). Some of the features of 
  97. the program are:
  98.  
  99.      Determination of correct shadows cast by arbitrarily shaped 
  100.      objects, onto arbitrarily shaped objects, due to arbitrarily 
  101.      placed light sources.
  102.  
  103.      Diffuse and specular reflections (with arbitrary levels of 
  104.      gloss or polish).  Rudimentary modeling of object-to-object 
  105.      diffusely reflected light is also implemented, that among other 
  106.      things accurately simulates color bleed effects from adjacent 
  107.      contrasting colored objects.
  108.  
  109.      Mirror reflections, including varying levels of mirror 
  110.      smoothness or perfection.
  111.  
  112.      Refraction and translucency (which is akin to variable 
  113.      microscopic smoothness, like the surface of etched glass).
  114.  
  115.      Two types of light sources: purely directional (parallel rays 
  116.      from infinity) of constant intensity, and spherical sources 
  117.      (like light bulbs, which cast penumbral shadows as a function 
  118.      of radius and distance) where intensity is determined by the 
  119.      inverse square law.
  120.  
  121.      Photographic depth-of-field.  That is, the virtual camera may 
  122.      be focused on a particular object in the scene, and the virtual 
  123.      camera's aperture can be manipulated to affect the sharpness of 
  124.      foreground and background objects.
  125.  
  126.                                     -2-
  127.  
  128.  
  129.  
  130.      Solid texturing.  Normally, a particular object (say a sphere) 
  131.      is considered to have constant properties (like color) over the 
  132.      entire surface of the object, often resulting in fake looking 
  133.      objects.  Solid texturing is a way to algorithmically change 
  134.      the surface  properties of an object (thus the entire surface 
  135.      area is no longer of constant nature) to try and model some 
  136.      real world material.  Currently the program has built in rules 
  137.      for modelling wood, marble, bricks, snow covered scenes, water 
  138.      (with arbitrary wave sources), plus more abstract things like 
  139.      color blend functions.
  140.  
  141.      Fractals.  The program implements what's known as recursive 
  142.      triangle subdivision, which creates all manners of natural 
  143.      looking surface shapes (like broken rock, mountains, etc.).  
  144.      The character of the fractal surface (degree of detail, 
  145.      roughness, etc.) is controlled by parameters fed to the 
  146.      program.
  147.  
  148.      AI heuristics to complete computation of a scene within a user 
  149.      specified length of time.
  150.  
  151. When the RAY program runs, it reads a sort of command file, that 
  152. contains a geometric description of the scene to be rendered, plus 
  153. desired global lighting conditions, camera parameters, etc.  Then 
  154. the program computes for a long time, writing each scan line to disk 
  155. as it computes it. The format of a scanline (in the .TMP) file is:
  156.  
  157.      <line  number> -   2 bytes long
  158.      <red   pixels> - 160 bytes long (4 bits per pixel)
  159.      <green pixels> - 160 bytes long
  160.      <blue  pixels> - 160 bytes long
  161.  
  162. which allows a single pixel's color to be represented in 12 bits, or
  163. 4096 colors.  For an entire screen (200 scan lines) this file is 
  164. 96,400 bytes.  A second program is run (DISPLAY.EXE) to display the 
  165. .TMP file, and optionally convert it to a standard Compuserve GIF (TM)
  166. format file.
  167.  
  168. In all, the DBW_Render package represents about 4000 lines of C 
  169. code.  It is largely based on original algorithms for the VAX by Tom 
  170. Dahl and Tone Engel at Digital Equipment Corporation. The AMIGA 
  171. version took several months to create.
  172.  
  173.  
  174.  Running RAY
  175.  ~~~~~~~~~~~~
  176. REMINDER: BEFORE RUNNING ANYTHING MAKE SURE YOU BACKUP THIS DISK!
  177.  
  178. Once you have an input file (described below in the "Creating a .DAT 
  179. file" section) you can run the ray tracer. Remember that the output 
  180. of the Ray Tracer (for a full screen) will be 96,400 bytes so make 
  181. sure you have enough free space on the disk you are running on. 
  182.  
  183. If you have a file called GLASS.DAT for input, you can type:
  184.  
  185.      ray glass
  186.  
  187.  
  188.                                -3-
  189.  
  190.  
  191.  
  192. The program will start running. All of the options are in the .DAT 
  193. file.  See the file GLASS.DAT (distributed with the package) for an 
  194. example.  As the program runs, it will write to the file GLASS.TMP. 
  195. If you want different names for the input and output files, then run 
  196. the program with no parameters:
  197.  
  198.      ray
  199.  
  200. at which point you will be prompted for the input file:
  201.  
  202.      Scene description file?
  203.  
  204. to which you could answer GLASS.DAT. The program will then ask for 
  205. the name of the output file:
  206.  
  207.      File name to save picture (.tmp)?
  208.  
  209. to which you could answer GLASS.TMP.
  210.  
  211. The program will now compute the picture. Note that 4 extra scan 
  212. lines before and after your scene are ALWAYS computed, so if you 
  213. told the program to do a full screen (command "& 0 200" in the 
  214. command file) you will notice that the program will start at scan 
  215. line -4 and will and at scan line 203.  This is due to one 
  216. requirement of the AI-heuristics to fill a scan line cache before 
  217. output can occur.
  218.  
  219. When the program finishes, it will give you a bunch of statistics 
  220. about the picture. One of the most interesting is the number of 
  221. pixels GUESSED as opposed to the number of pixels COMPUTED. This 
  222. will give you and idea of how high a quality output to expect (0 
  223. guessed = perfect). These numbers are affected by the amount of time 
  224. you give the program to compute the picture in ("R" command in the 
  225. command file).
  226.  
  227.  
  228.  Running DISPLAY
  229.  ~~~~~~~~~~~~~~~
  230. After RAY has completed, the output .TMP file (or files) may be 
  231. displayed, or converted to a .GIF file, by DISPLAY.EXE.  Multiple 
  232. files may be given to DISPLAY for several reasons:
  233.  
  234.      1)   The machine crashed and so you have one partial file and 
  235.           another that has the rest of the scan lines in it.
  236.  
  237.      2)   You decided to do the picture in strips and have a 
  238.           seperate file for each strip.
  239.  
  240.      3)   You did the entire picture, but there are blurry scan 
  241.           lines around complex objects (like light sources) because 
  242.           you didn't give it enough time... so you recomputed the 
  243.           bad sections allowing more time.
  244.  
  245. These will become clearer as we do the examples. To run the program, 
  246. type:
  247.  
  248.      display glass
  249.  
  250.  
  251.  
  252.                                -4-
  253.  
  254.  
  255.  
  256. This will open file GLASS.TMP (which was output from RAY), scan the 
  257. file finding the 256 most used colors, and create an image on the 
  258. screen.  When completed, the computer will "beep".
  259.  
  260. To create a .GIF file, type:
  261.  
  262.      display -g<name.gif> <name> [<name> ... ]
  263.  
  264. Where the options are:
  265.  
  266.      -g<name.gif> =  name of the output file, default is the
  267.                         .TMP file name with a .GIF suffix
  268.      <name>       =  up to 10 input (.TMP) file names
  269.  
  270. For example:
  271.  
  272.      display -g glass
  273.  
  274. The example shown will create an image exactly like the previous 
  275. example and an output file named "GLASS.GIF" (since the default 
  276. output file name is being taken).  If we wanted the .GIF file 
  277. to be named "TEMP.GIF", we could type:
  278.  
  279.      display -gtemp.gif glass
  280.  
  281. To combine output (.TMP) files produced on several different 
  282. machines, we could type:
  283.  
  284.      display glass1 glass2 glass
  285.  
  286. In this example we are using multiple input files. The program will 
  287. ALWAYS use scanlines from files earlier in the command line (if 
  288. possible). So for example, GLASS.TMP (on the distribution disk) 
  289. contains a 12 hour complete picture. GLASS1.TMP and GLASS2.TMP 
  290. contain scanlines around the light sources (that are blurry in 
  291. GLASS.TMP) but with a resolution of 24 hours (so that they're much 
  292. better (each took between 1 and 2 hours to compute)).
  293.  
  294. This program also uses a heuristic to figure out how to fold 4096 
  295. colors into 256 for the MCGA/VGA 256 color mode.
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.                                -5-
  316.  
  317.  
  318.  
  319.  Creating a .DAT file
  320.  ~~~~~~~~~~~~~~~~~~~
  321.  
  322. Okay, now the hard part: the contents of the script input file.  The 
  323. file is a standard ASCII text file, with each line forming a 
  324. separate object or command to RAY.  The lines begin with a command 
  325. character (which is CASE SENSITIVE).  The command characters are:
  326.  
  327. R    Set resolution (optional - default is 12.0 hours).
  328. N    Global index of refraction (optional, default = 1.0).
  329. Z    Produce 2D histogram rather than image (default is image).
  330. a    Overriding ambient proportion factor (default not overridden).
  331. A    Set antialiasing parameters (default no antialiasing).
  332. F    Lens focus and aperture for depth of field (default infinite) 
  333. M    Set global diffuse lighting parameters (default off).
  334. &    Define scan-line region of image to generate.
  335. *,!  comment, ignored.
  336. b    Set background color.
  337. w    Define a wave source.
  338. g    Define a color blend texture.
  339. n    Define a snowfall texture.
  340. k    Define a 3D checkerboard texture.
  341. H    Set global haze parameters (default no haze).
  342. f    Define fractal surface parameters.
  343. m    Define a marble texture.
  344. d    Define a wood texture.
  345. p    Define a pebbly texture.
  346. e    Set the eye (camera) view parameters.
  347. l    (lower case 'L') Define a directional light source.
  348. L    Define a spherical light source.
  349. {    Start an extent.
  350. }    Terminate an extent.
  351. s    Specify a spherical object.
  352. t    Specify a planar triangular object.
  353. x    Specify a fractal triangular object.
  354. q    Specify a planar parallelogram object.
  355. r    Specify a planar ring (annular) object.
  356.  
  357. All color values consist of three numbers that range from 0 to 1.  
  358. The color components are specified BLUE, GREEN, RED.
  359.  
  360. All position/direction values are three numbers ranging in whatever 
  361. numbering system you want.  The numbers are X, Y, Z order.  Assuming 
  362. you are looking into the screen in the negative Z direction, 
  363. positive X is to the right, positive Y is up, and positive Z is out 
  364. from the screen.
  365.  
  366. Okay, on to the specifics of the parameters that each command 
  367. character requires.  First are listed all the general 
  368. (environmental) commands, then are listed the commands that create 
  369. objects to be rendered in the scene.
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.                                -6-
  380.  
  381.  
  382.  
  383.                Global index of refraction (optional, default = 1.0)
  384. N INDEX
  385.      This single value is taken to be the index of refraction of 
  386.      "the air", or put another way of the space between and outside 
  387.      of all objects.
  388.  
  389.  
  390.                Set resolution (optional, default = 12.0 hours)
  391. R RESOLUTION
  392.      The RESOLUTION value controls the MAXIMUM amount of time that a 
  393.      full screen (400 scanlines) is allowed to take. This number 
  394.      should typically be between 1.0 and 30.0 hours. The more time 
  395.      you give the program the better the picture will be that you 
  396.      get.
  397.  
  398.  
  399.                Produce 2D histogram, rather than true image
  400. Z FLAG
  401.      Normally, the contents of the .TMP file that the ray tracer 
  402.      produces is a binary pixel version of the described scene.  
  403.      However, for the purposes of doing performance tuning of an 
  404.      antialiased scene, you can include the command "Z 1" in the 
  405.      script file.  If done, the image file that the ray tracer 
  406.      generates will not be the color scene that it normally is, but 
  407.      instead will be a sort of 2D histogram of how much computation 
  408.      each pixel in the scene consumed, displayed as a gray scale 
  409.      (the brighter the pixel, the more computation).  Note that this 
  410.      command is only meaningful if non-default values for the "A" 
  411.      command have been used.  By default, basically an equal amount 
  412.      of time is spent on each pixel, (thus an image with Z set to 1 
  413.      would come out a flat gray) but the "A" command tells the ray 
  414.      tracer to concentrate on certain types of details in the scene 
  415.      to produce alias-free images.  Using the Z command with a 
  416.      parameter of 1 will allow you to see just where the ray tracer 
  417.      decided to spend more time, smoothing edges, etc.
  418.  
  419.  
  420.                Set overriding ambient proportion factor
  421. a FACTOR
  422.      As described below, each object in the scene contains 
  423.      parameters that control how bright the object appears if no 
  424.      light is shining on it.  Thus you can set some objects to 
  425.      appear brigher when in shadow that other objects.  As an 
  426.      alternative, you can specify the "a" command with a parameter 
  427.      from 0 to 1, and this will cause the ambient color of all 
  428.      objects in the scene to be a fraction of their diffuse 
  429.      brightness.  When the "a" command is used, the BGR ambient 
  430.      values for each object are ignored (but they must still be 
  431.      specified).  A reasonable starting point would be to set FACTOR 
  432.      from between .1 and .2.
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.                                -7-
  444.  
  445.  
  446.  
  447.                Set antialiasing parameters
  448. A COUNT THRESHHOLD
  449.      By default, the ray tracer computes one ray into the scene for 
  450.      each pixel in the image (so a 320X200 image computes 64000 
  451.      rays).  Quite often, some unpleasant side effects of the 
  452.      digital generation process become apparent in a scene generated 
  453.      with one ray per pixel, for example diagonal lines are rendered 
  454.      as a sequence of discrete stairsteps -- the dreaded jaggies.  
  455.      Such false features are called aliasing defects.  There are 
  456.      numerous techniques devised to try to reduce the magnitude of 
  457.      these defects, collectively referred to as the process of anti-
  458.      aliasing.  (There are many other types of aliasing defects 
  459.      besides jaggies.  An example of another "defect" is the razor-
  460.      sharp shadows that are traditionally found in computer 
  461.      generated imagery -- real-world shadows are always at least a 
  462.      teensy bit diffuse.)
  463.  
  464.      The COUNT parameter determines how many rays will be traced for 
  465.      each pixel in the scene -- the more, the better, but the slower 
  466.      the computing.  A good starting value is 4.  What happens is 
  467.      that a bunch of rays (e.g. 4) are sent into the pixel cone at 
  468.      random -- they are "distributed" across the horizontal and 
  469.      vertical dimensions.  Thus, this ray tracer is said to 
  470.      implement Distributed Ray Tracing.
  471.  
  472.      The THRESHHOLD value relates to a rather complicated feature in 
  473.      the ray tracer called Statistically Optimized Distributed Ray 
  474.      Tracing.  The way this works is that the program computes the 
  475.      intensities of the bunch of rays that are distributed into the 
  476.      pixel.  In this example, say there are four rays in the bunch.  
  477.      The program computes the statistical variance of the four 
  478.      resulting intensities.  If the variance is small, the odds are 
  479.      that the portion of the scene being imaged is a smooth patch.  
  480.      Thus a good approximation to the ideal intensity of that pixel 
  481.      has been computed.  But let's say that the pixel happens to 
  482.      fall on a diagonal edge.  Some of the distributed rays will be 
  483.      cast to one side of the edge, and some of them to the other.  
  484.      Thus the variance will be high.  The program looks at this, and 
  485.      if the variance is past the THRESHHOLD value, will distribute 
  486.      another group of (in this case) four rays into the pixel.  Then 
  487.      the variance of the eight rays will be examined, and the 
  488.      process repeated until the required smoothness has been reached 
  489.      (or some arbitrarily large number of rays have been cast, and 
  490.      the process halts).  Setting THRESHHOLD to values of 1.0 or 
  491.      higher generally will force no extra groups of rays to be cast, 
  492.      beyond the initial group of COUNT rays.  Meaningfull values of 
  493.      THRESHHOLD generally fall in the .0001 to .1 range.
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.                                -8-
  508.  
  509.  
  510.  
  511.                Set lens focus and aperture for depth of field
  512. F APERTURE FOCUS
  513.      This command is optional; if omitted, the scene will be 
  514.      rendered such that all objects will be in perfect focus (a pin-
  515.      hole camera effect).  With this command, you can add depth-of-
  516.      field effects to a scene (though at great computation speed 
  517.      degradation, as described below).  The APERTURE parameter 
  518.      specifies the radius of the hypothetical lens in the camera 
  519.      that is taking the picture of the scene.  FOCUS sets the 
  520.      distance from the camera (or eye) at which objects will appear 
  521.      in perfect focus.  The magnitude of both values depends upon 
  522.      the coordinate system in use by your scene, of course, but here 
  523.      is an example for determining a reasonable camera aperture.  
  524.      Say that one unit of distance represents an inch.  Assume you 
  525.      set the focus distance to 100 inches; with this scale, a 
  526.      reasonable value for aperture is 0.5 to 2.0.
  527.  
  528.      In order to achieve a good quality smooth blurring of the 
  529.      foreground and background, you will need to set the 
  530.      antialiasing parameters up from their defaults (with the A 
  531.      command).  A good start would be 20 to 30 rays per pixel; the 
  532.      THRESHHOLD value doesn't matter much; it could be set to 1.
  533.  
  534.  
  535.                Set global diffuse lighting parameters
  536. M COUNT NUMERATOR DENOMINATOR
  537.      This command relates to the realistic propagation of light as 
  538.      it reflects from object to object in the scene.  Traditionally, 
  539.      computer lighting models operate such that if an object is 
  540.      directly visible from a light source, then the surface of the 
  541.      object is colored according to the material's properties, the 
  542.      color and strength of the light, etc.  For those objects or 
  543.      portions of objects that are not in the path of a light source 
  544.      (aka are in shadow), they are rendered black.  Well, this is 
  545.      usually artificial looking, and so a constant dim color is 
  546.      assigned to areas in shadow.  (In fact, this program has 
  547.      provisions for this as well, the ambient parameters of each 
  548.      object, plus the "a" command.)
  549.  
  550.      But in reality, shadows are filled in with light bounced off 
  551.      walls, etc.  The M command can be employed to model this 
  552.      diffuse propagation of light from object to object.  (Sadly, 
  553.      once again performance suffers significantly if you choose to 
  554.      do this, since a great deal of information about the scene 
  555.      needs to be collected and analyzed to determine how the shadow 
  556.      fill-in should occur.)  How this program does this is to, for 
  557.      each pixel, sample extra rays from the surface being rendered, 
  558.      out into the scene in random directions to see what other 
  559.      nearby surfaces are acting as reflectors, etc.  The COUNT 
  560.      parameter controls how many samples to take per pixel; values 
  561.      from 10 on up are okay, but 100 or more are needed to render 
  562.      smooth color bleeding from surface to surface, etc.  The 
  563.      NUMERATOR and DENOMINATOR derive from the recursive nature of 
  564.      the ray tracing process: in the process of calculating a ray on 
  565.      the surface being rendered, assume the ray strikes an adjacent 
  566.      surface.  Well, from THAT surface, another COUNT set of rays 
  567.  
  568.  
  569.  
  570.  
  571.                                -9-
  572.  
  573.  
  574.  
  575.      will be sampled, to determine ITS color, etc.; thus the process 
  576.      exponentially generates rays that need to be computed.  To 
  577.      avoid this recursive growth, the number of sample rays that are 
  578.      done per recursion level is scaled from the initial COUNT 
  579.      value, according to the supplied NUMERATOR and DENOMINATOR 
  580.      values.   For example values of 1 and 2 respectively will 
  581.      reduce by half the number of samples taken at each recursion 
  582.      level.  Normally, even this is not a fast enough decay, so 1/3 
  583.      or 1/4 is better, without much noticable loss in resulting 
  584.      color fidelity.  In fact, setting NUMERATOR to 0 is not 
  585.      unreasonable.
  586.  
  587.  
  588.                Define scan-line region of image to generate
  589. & FIRST LAST
  590.      If this command is omitted, the entire image bitmap will be 
  591.      calculated (all 400 scan lines).   This command tells the 
  592.      program only to produce those scans from FIRST to LAST-1 
  593.      inclusive.  Once done, the resulting fragment images can be 
  594.      combined into one whole image file.   In this way, a 
  595.      particularly complex scene may be distributed into a number of 
  596.      CPUs, resulting in shorter elapsed generation time. Picture 
  597.      merging is accomplished by DISPLAY ).
  598.  
  599.  
  600.                Set background color
  601. b BLUE GREEN RED
  602.      The simple color value that will be displayed if no objects are 
  603.      visible at a given point in the scene.
  604.  
  605.  
  606.                Define a wave source
  607. w CENTERX CENTERY CENTERZ  WAVELENGTH AMPLITUDE DAMP PROPAGATE
  608.      A number of features in the program use wave sources as a basis 
  609.      for calculating various effects (most notably the production of 
  610.      rippled surfaces, such as water).  You can define up to 100 
  611.      wave sources per scene.  There is only one "wave source table" 
  612.      stored by the program; all of the features that use waves use 
  613.      the same waves.  The first three values specify the coordinate 
  614.      from which the concentric wave fronts emanate from.  WAVELENGTH 
  615.      sets the crest-to-crest distance for the wave.  The AMPLITUDE 
  616.      value determines, in an abstract manner, the height of the wave 
  617.      at the origin.  The height is not specified in normal distance 
  618.      units; rather it is a fixed scale frational value, in the 
  619.      approximate range of 0.1 (small, flat waves) to 0.5 (strong 
  620.      waves).  The DAMP value controls the damping of successive 
  621.      trains of waves.  The value 1.0 means no damping; the waves 
  622.      will contine out to infinity from the source.  Value 0.7 means 
  623.      that successive crests will be 70% the height of the preceeding 
  624.      crest.  The PROPAGATE value controls what phase the wave starts 
  625.      broadcasting at; the value ranges from 0.0 (starting at a crest 
  626.      at the origin) through 0.5 (180 degrees out of phase -- a 
  627.      trough) and back to 1.0 (a crest).  This can be used in 
  628.      sequenced frames to produce moving waves.
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.                               -10-
  636.  
  637.  
  638.  
  639.                Define a color blend texture
  640. g BCOLOR GCOLOR RCOLOR  START RANGE
  641.      Normally, an object is solidly and uniformly colored across its 
  642.      entire surface.  This command lets you define a blend function 
  643.      which can be applied to any object, in such a manner that the 
  644.      color of the object will vary as a function of altitude (Y 
  645.      coordinate).  For example, a sphere could be blue at the south 
  646.      pole, and yellow at the north pole, with the color smoothly 
  647.      changing in the middle.  You can define up to ten blends per 
  648.      scene.  The three COLOR values specify the target color that 
  649.      the surface will blend to with increasing Y coordinate (the 
  650.      initial color of the object at low Y coordinate values is taken 
  651.      from the diffuse coeficients of the object, as defined a ways 
  652.      below in the section on object properties).  The START value 
  653.      defines the low-Y coordinate where blending starts; surface 
  654.      points below this Y level will be colored with the objects 
  655.      diffuse coeficients.  The blending continues from START, 
  656.      continuing for RANGE units upward.  At the level of 
  657.      START+RANGE, the blend would have saturated out at the new 
  658.      COLOR value.  Points above START+RANGE will maintain the new 
  659.      COLOR.  As an example, consider a sphere of radius 100 units 
  660.      positioned at the origin.  If START was set to -33, and RANGE 
  661.      was set to 66, the result would be that the lower third of the 
  662.      sphere would be its base diffuse color; the middle third would 
  663.      gradually change color up until at the +33 level the color 
  664.      would attain the new COLOR; the upper third of the sphere would 
  665.      maintain the new COLOR.
  666.  
  667.  
  668.                Define a snowfall texture
  669. n START ALTITUDERANGE ALTFACTOR THRESHHOLD
  670.      This texture function is similar to the above blend texture.  
  671.      It is still under development.  This is intended to be used 
  672.      with the fratcal surface capabilities described below.  The 
  673.      theory is that this will distribute snow onto an object, the 
  674.      nature of which varies according to the local surface slope and 
  675.      altitude.  START is the lower bound below which there can be no 
  676.      snowfall accumulation, even on level surfaces.  Points on the 
  677.      surface above the level of START+ALTITUDERANGE generally are 
  678.      solidly blanketed with snow.  ALTFACTOR is a scaler that lets 
  679.      you determine how important altitude is in determining snow 
  680.      cover; value 0 means it is irrelevant (thus it is just a 
  681.      function of local surface slope).  Values above 1.0 generally 
  682.      result in a faster buildup of snow at the low end of the 
  683.      ALTITUDERANGE scale.  THRESHHOLD controls when a surface will 
  684.      be solidly blanketed, if it meets the threshhold test.  Values 
  685.      for this parameter range from 0.0 (at which everything from 
  686.      START and above will be solidly coated, regardless of slope) to 
  687.      1.0, where coverage will be a continuous function of slope and 
  688.      altitude.  Values around .4 result in surfaces from about 40 
  689.      degrees of slope and flatter to be solidly covered.
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.                               -11-
  700.  
  701.  
  702.  
  703.                Define a 3D checkerboard texture
  704. k BCOLOR GCOLOR RCOLOR  X Y Z  JUNK1 JUNK2 JUNK3
  705.      You can define up to 10 checker textures per scene.  This 
  706.      texture function determines the color of points on the surface 
  707.      of an object, using a 1- (layer), 2- (checker, column), or 3-
  708.      dimensional (block) model.  As the points on the surface of an 
  709.      object are colored, this texture function can be used to 
  710.      determine whether the color of the point in question is the 
  711.      object's base diffuse color, or is a different specified color 
  712.      (controlled the three COLOR parameters to this command).  To 
  713.      determine whether the surface point is inside or outside which 
  714.      color region, the X Y Z pattern size values are checked.  The X 
  715.      parameter defines the width of successive layers from left to 
  716.      right; Y defines the width of successive layers from top to 
  717.      bottom; Z is for front to back.  Note that one or more X Y or Z 
  718.      values can be set to 0.  This will cancel any variation in the 
  719.      pattern in the corresponding dimention.  For example, if X and 
  720.      Z are set to 10 but Y is 0, the effect will be of square 
  721.      vertical columns of alternating color.  If only Y were non-
  722.      zero, the effect would be of horizontal layers of alternating 
  723.      color.  Setting all three to non-zero creates a solid 3D block 
  724.      pattern.  The width of the layers in X Y and Z need not be the 
  725.      same (so you can make long flat blocks, for example).  JUNK1, 
  726.      JUNK2, and JUNK3 are currently not used and should be set to 0.
  727.  
  728.  
  729.                Set global haze parameters
  730. H BCOLOR GCOLOR RCOLOR  DISTANCE
  731.      If this command is omitted, the color of each pixel in the 
  732.      scene is not affected by how far the rendered surface is from 
  733.      the eyepoint.  By using this haze command, you can cause 
  734.      objects in the distance to be progressively tinted to a 
  735.      specified target haze color (the three COLOR values).  Objects 
  736.      that are DISTANCE units or farther from the eyepoint will be 
  737.      completely tinted or blended to the haze color and thus will 
  738.      become effectively invisible.  Objects closer than this 
  739.      distance will be continuously tinted from their true local 
  740.      color to the haze color, in a linear manner as a function of 
  741.      distance.
  742.  
  743.  
  744.                Define fractal surface parameters
  745. f RECURSIONLEVEL  XSCALE YSCALE ZSCALE  FINALTEXTURE
  746.      This texture can only be applied to 'x' objects as defined 
  747.      below.  The ray tracer so far only knows how to render a small 
  748.      set of primitive object shapes, one of which is the three-sided 
  749.      polygon (triangle).  As described in the 'x' command below, the 
  750.      ray tracer does have the capability to algorithmically generate 
  751.      compound objects that are constructed out of large numbers of 
  752.      adjacent triangles forming what is called a stochastic surface 
  753.      (often thought of as a fractal surface, though in fact the 
  754.      relationship to the mathemacits of fractals is limited).  This 
  755.      command defines parameters that the ray tracer uses in 
  756.      constructing the mesh of triangular surface patches.
  757.  
  758.      You can define up to 10 fractal textures per scene.  In order 
  759.      to define a fractal surface, you must also define at least one 
  760.  
  761.  
  762.  
  763.                               -12-
  764.  
  765.  
  766.  
  767.      wave source with the "w" command (the reason for this 
  768.      apparently unrelated need will be explained).  The general 
  769.      fractal construction procedure is based on recursive triangle 
  770.      subdivision, applying complex coordinate shifts when 
  771.      determining the vertices of the subdivision triangles.  You 
  772.      start with one master triangle that controls the gross size and 
  773.      orientation of the final surface.  The original triangle is 
  774.      split into four triangles (by bisecting the three sides and 
  775.      connecting the midpoints).  The corners of the new triangles 
  776.      are then shifted in space, and they are recursively subdivided 
  777.      in turn, to the desired level.  The RECUSIONLEVEL sets this 
  778.      depth; the higher the depth, the finer the resulting surface, 
  779.      but the slower the image will take to compute (on the order of 
  780.      four times with each successive level).  Plus larger level 
  781.      values require substantial quantities of address space to 
  782.      contain the generated triangle data (on the order of thousands 
  783.      of 512-byte memory pages for a level of 7, for example... so BE 
  784.      CAREFUL!).
  785.  
  786.      The X Y and ZSCALE values allow you to emphasize distortion 
  787.      differenly in the three dimensions (X and Z of 1.0, with Y of 
  788.      3.0 results in three times as much vertical relief as 
  789.      horizontal, for example).  Values of 0 for a scale parameter 
  790.      cause the sub-triangles to not move in the indicated dimension 
  791.      (X and Y of 0 will make the resulting surface maintain a 
  792.      triangular silhouette as seen from above).
  793.  
  794.      The FINALTEXTURE value will be assigned as the texture function 
  795.      number for each of the sub-triangles (see the description of 
  796.      texture function values for objects below).  Basically, this 
  797.      allows you to apply a uniform texture to the entire fractal 
  798.      object: a smooth color gradiation, a checkerboard, etc.
  799.  
  800.      As mentioned above, to get a good rough fractal surface, you 
  801.      need to also define a small number of wave sources.  A good 
  802.      starting point is to specify five or six wave sources, whose 
  803.      actual XYZ coordinates are scattered about the scene.  Giving 
  804.      them different wavelenghts and amplitudes will increase the 
  805.      fluctuation in the surface.  Generally, the damping should be 
  806.      small (values of or near 1.0).  The actual manner in which the 
  807.      waves are utilized in constructing the sub triangle vertices is 
  808.      beyond convenient description; suffice it to say that there is 
  809.      NO randomness involved, and that different wave patters will 
  810.      produce markedly different fractal surfaces.  Experiment.
  811.  
  812.  
  813.                Define a marble texture
  814. m BVEINCOLOR GVEINCOLOR RVEINCOLOR XSCALE TURBULENCE SQUEEZE
  815.      You can define up to ten marble textures per scene.  This 
  816.      texture relies on your having defined at least one wave source, 
  817.      for reasons described below.
  818.      The marble is modelled as a base substance that has intrusions 
  819.      of a second substance into the base.  The base color is 
  820.      determined by the diffuse coefficients for the object.  The 
  821.      intrusion color is specified in the three VEINCOLOR parameters.  
  822.      The actual color for the surface of the marble object is a 
  823.      complex blending function of the two starting colors.
  824.  
  825.  
  826.  
  827.                               -13-
  828.  
  829.      The basic formula for making the intrusions (veins) is to start 
  830.      with equally spaced vertical layers (spaced along the X axis).  
  831.      The spacing is determined by the XSCALE parameter (good values 
  832.      are from 0.1 to 1).  Then turbulence is applied to the layers, 
  833.      deforming them into myriad whorls and streaks, etc.  The amount 
  834.      of turbulence is set by the TURBULENCE parameter (values from 
  835.      1.0 to 3.0 are nice).  The rough thickness of the streaks is 
  836.      determined by the SQUEEZE parameter (which must be an integer -
  837.      - no fractional component).  The value 1 means leave them 
  838.      normal width; 2 means twice as thin; 3 means four times as 
  839.      thin; 4 means eight times, etc.  Another way to think of 
  840.      SQUEEZE is that it affects how fast the blending occurs from 
  841.      the base to the vein color.
  842.  
  843.      The turbulence is controlled by (of all things) the wave 
  844.      sources that you have defined in the scene.  Unfortunately, the 
  845.      correspondence between a particular wave source and a 
  846.      particular turbulent result is almost impossible to predict 
  847.      (but it IS possible; there is no randomness involved).  All 
  848.      that can really be done is to give guidelines for general wave 
  849.      parameter values.  First, four or five wave sources are needed.  
  850.      The wave centers should be well distributed around the scene.  
  851.      The wavelengths should vary amongst the source a good amount 
  852.      (some should be five or six times the wavelength of other 
  853.      sources).  Not much damping should be applied (values from 1.0 
  854.      down to 0.95 perhaps).
  855.  
  856.  
  857.                Define a wood texture
  858. d BCOLOR GCOLOR RCOLOR THICKSCALE RINGSCALE TURBULENCE SQUEEZE
  859.      You can define up to ten wood textures per scene.  This texture 
  860.      relies on your having defined at least one wave source, just 
  861.      like for the marble textures listed above.  In fact, at this 
  862.      time wood is modelled very similarly to marble, except that 
  863.      where marble consists of parallel layers of base material, wood 
  864.      consists of concentric cylinders of base material (aligned 
  865.      along the Y axis).  The RINGSCALE parameter is analogous to 
  866.      XSCALE for marble; TURBULENCE and SQUEEZE are the same.  
  867.      THICKSCALE basically controls how faint or strong the grain is 
  868.      rendered; values above 1.0 enhance the grain; values less than 
  869.      1.0 subdue the grain.
  870.  
  871.  
  872.         Define a pebbly texture
  873. p SCALE ZOOM
  874.      This texture is similar to the snowfall texture. It is still under
  875.      development. This is intended to allow pertubations of an object
  876.      surface based on random "zooming" of each point on the surface
  877.      (times the "scale"). Typical input values are: "p 1.0 0.5".
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.                               -14-
  892.  
  893.  
  894.  
  895.                Set the eye (camera) view parameters
  896. e XPOS YPOS ZPOS  XVIEW YVIEW ZVIEW  XUP YUP ZUP
  897.      First triple sets the position of the eyepoint.  Second triple 
  898.      defines the direction (relative to that point) that the eye 
  899.      will look along to define what is visible.  The length of this 
  900.      vector determines the "wide-andle vs. telephoto" effect.  To 
  901.      guage what different lengths mean, at the tip of the VIEW 
  902.      vector the screen is projected as if it were 256 units 
  903.      horizontally by 170 units vertically.  Thus the magnitude of 
  904.      the numbers you choose for XYZ points interact with the view 
  905.      vector length to determine the cone of visibility.  The third 
  906.      triple is the direction you want to be "up"; usually 0 1 0 is 
  907.      what you want.
  908.  
  909.  
  910.                Define a directional light source
  911. l BLUE GREEN RED  XDIR YDIR ZDIR
  912.      The first triple is the color and intesity of the light (1 1 1 
  913.      would be bright white; 0.5 0 0.5 would be dim magenta).  The 
  914.      second triple is the direction from which the light is comming.  
  915.      For example 1 0 0 would mean the light is comming in straight 
  916.      along the X axis (from positive to negative).  You can have at 
  917.      most 100 light sources per scene (many light sources sloooows 
  918.      things down -- two is reasonable!).
  919.  
  920.  
  921.                Define a spherical light source
  922. l BLUE GREEN RED  XCENTER YCENTER ZCENTER  DISTANCESCALE  RADIUS
  923.      The first triple is the color and base intensity of the light, 
  924.      just as for directional light sources.  The second triple is 
  925.      the XYZ coordionate of the center of the spherical light 
  926.      source; it can be anywhere inside or outside of the visible 
  927.      scene.  (Note that if the center is within the scene, it is not 
  928.      a visible object per-se.  For example, if you wanted a 
  929.      lightbulb, you would place the spherical light source where you 
  930.      wanted it, and also place a transparent sphere at the same 
  931.      coordinates and with the same radius.)  The DISTANCESCALE 
  932.      relates to the inverse-square law with which the brightness of 
  933.      the light diminishes within the scene.  To explain how to set a 
  934.      value for DISTSCALE, consider the following example. Say you 
  935.      wanted a full-intensity white lightbulb (i.e. its nominal BGR 
  936.      values would be 1 1 1) to shine onto a table.  If the table 
  937.      were, say, 37 units of distance from the light coordinate, then 
  938.      you'd want to set DISTSCALE to 37 in order that the table would 
  939.      be fully illuminated.  Thus, objects closer to the light that 
  940.      37 would appear very bright (indeed, probably "overexposed") 
  941.      while objects farther than 37 units from the light would become 
  942.      increasingly dimly lit.  RADIUS is the radius of the light 
  943.      emitting sphere; 0.0 would be a point light source.  (Note that 
  944.      point light sources are faster to compute.)  Also note that 
  945.      non-zero radius light sources cast penumbral shadows, though to 
  946.      be effective you will need to increase the antialias parameters 
  947.      defined by the "A" command.
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954.  
  955.                                -15-
  956.  
  957.  
  958.  
  959. Now for the actual objects that compose a scene.  You can have about 
  960. thousand object (max) per scene.  All objects have the same basic 
  961. properties available to them.  Specifically, the first portion of 
  962. the command line for any object starts with:
  963.  
  964.  
  965. @ TEX FUZZ MIRROR IDX  TRA_B TRA_G TRA_R  
  966.                     AMB_B AMB_G AMB_R  DIF_B DIF_G DIF_R
  967.  
  968.      "@" is the object command character (s,q,x,t,r).
  969.  
  970.      TEX is an integer value that specified what texture function 
  971.      should be applied to this object.  Value 0 means no texture 
  972.      (plain, boring evenly colored flat surface).  Positive values 
  973.      select from among the supported texture functions, as follows:
  974.  
  975.      Value          Texture function
  976.      -----          ----------------
  977.  
  978.        1:      Y axis color gradiation
  979.                Compute the color at each point on the surface as a 
  980.                function of the point's Y coordinate.  Starting at 
  981.                Y=0, the color belnds from red to blue to green and 
  982.                back to red at Y=20. The colors repeat every 20 units 
  983.                in Y.
  984.  
  985.       3:       Mottled diffuse
  986.                The brightness of the surface of the object varies to 
  987.                form a mottled pattern.  This texture requires some 
  988.                wave sources to be defined.
  989.  
  990.       4:       Wavy surface
  991.                The surface will be rendered as being criss-crossed 
  992.                by overlapping waves.  If reflectivity is turned on 
  993.                for the object, the reflections will be rippled, etc.
  994.  
  995.       5:       Brick pattern
  996.                The object will be rendered as if it were carved out 
  997.                of bricks.  The brick size is currently hardwired to 
  998.                be height=3.0, width=8.0, depth=4.0, mortar 
  999.                thickness=0.5.  The color of the bricks is determined 
  1000.                by the diffuse coefficients for the object; the color 
  1001.                of the mortar is hardwired at BLUE=0.8, GREEN=0.85, 
  1002.                RED=0.99.  The bricks are aligned with the coordinate 
  1003.                system.
  1004.  
  1005.       10..19:  Single Wave
  1006.                This is like texture 4, except that the surface is 
  1007.                rippled by only one wave (rather than all of them 
  1008.                with texture 4).  Texture 10 means use the first 
  1009.                wave, texture 11 means use the second wave, etc. up 
  1010.                to 19 for the tenth wave.  
  1011.  
  1012.  
  1013.       20..29:  Marble
  1014.                Render the object as if it were carved out of marble.  
  1015.                The marble texture chosen depends on the texture 
  1016.                number: texture 20 uses the first marble defined, 
  1017.                texture 21 uses the second marble defined, etc.
  1018.  
  1019.                               -16-
  1020.  
  1021.       40..49:   Wood
  1022.                Render the object as if it were carved out of wood.  
  1023.                The wood texture chosen depends on the texture 
  1024.                number: texture 20 uses the first wood defined, 
  1025.                texture 21 uses the second wood defined, etc.
  1026.  
  1027.       50..59:   Checkered
  1028.                Color the surface of the object according the the 
  1029.                chosen checkerboard texture.  Texture 50 uses the 
  1030.                first defined checker pattern, etc.
  1031.  
  1032.       60..69:   Fractal
  1033.                This isn't a texture per se (in so far as most other 
  1034.                textures operate by changing the color of surface 
  1035.                points of the object).  This texture determines what 
  1036.                fractal surface contours should be applied to this 
  1037.                object.  This texture type may only be specified for 
  1038.                object type X (fractal objects).  Texture 60 uses the 
  1039.                first defined fractal type, etc.
  1040.  
  1041.       70..79:  Smooth blend
  1042.                Render the surface of the object as a blend between 
  1043.                the objects normal diffuse color, and the specified 
  1044.                blend texture color.  Texture 70 uses the first 
  1045.                defined blend texture, etc.
  1046.  
  1047.       80..89:   Snow
  1048.                Color the surface of the object by applying the 
  1049.                chosen snowfall texture.  Texture 80 uses the first 
  1050.                defined snow texture, etc.
  1051.  
  1052.       90..99:   Pebble
  1053.                Perturb the surface via a previously defined pebble 
  1054.                texture.  Texture 90 uses the first defined pebble 
  1055.                texture, etc.
  1056.  
  1057.  
  1058.      FUZZ is a pseudo-texture factor 0 to 1 that applies a random 
  1059.      fuzz to the surface of the object.  This can be used in a 
  1060.      number of ways: to model soft surfaces like tennis balls; to 
  1061.      form imperfectly reflecting mirrors, to form translucent 
  1062.      (etched) glass, etc.
  1063.  
  1064.      MIRROR is a 0 to 1 value where 0 means no specular and mirror 
  1065.      reflection, and 1 means 100% specular & mirror reflection.
  1066.  
  1067.      IDX is the index of refraction for the object.  This is only 
  1068.      relevant if the transparency for the object is non-zero.
  1069.  
  1070.      TRA_B, _G, _R is the transparency of the object in each color 
  1071.      band.  0 means opaque, 1 means 100% transparent.
  1072.  
  1073.      AMB_B, _G, _R is the ambient light value for the object, 0 to 
  1074.      1.  0 means no pseudo-ambient light, 1 means VERY strong 
  1075.      ambient light (generally not useful so strong -- washes the 
  1076.      object out).
  1077.  
  1078.  
  1079.  
  1080.  
  1081.  
  1082.  
  1083.                               -17-
  1084.  
  1085.  
  1086.  
  1087.      DIF_B, _G, _R is the diffuse reflection values 0 to 1 for the 
  1088.      object in the color bands.  For example, glass has virtually 
  1089.      zero diffuse reflection, while chaulk has very high (near 1) 
  1090.      diffuse reflection.  The diffuse coefficients determine the 
  1091.      color of the object (in conjunction with the color of the light 
  1092.      sources).
  1093.  
  1094. From the above, notice that non-rational objects can be created.  
  1095. For example, a ball that is 100% transparent AND 100% reflective.
  1096.  
  1097. Now onto each object.  The parameters below FOLLOW (appear to the 
  1098. right of) all of the above property parameters.
  1099.  
  1100.  
  1101.                Sphere
  1102. s CENTERX CENTERY CENTERZ  RADIUS
  1103.      Self-explanetory.
  1104.  
  1105.  
  1106.                Parallelogram
  1107. q POSX POSY POSZ  VE_X VE_Y VE_Z  VP_X VP_Y VP_Z
  1108.      The position triple defines a corner of the parallelogram.  The 
  1109.      second and third triple are two vectors that define the two 
  1110.      sides of the object adjacent to and relative to the defining 
  1111.      point.  Here's the hard part: the order of the two vectors 
  1112.      matters.  To try to put it simply, the VE vector is the one on 
  1113.      the left when viewed from "above," and the VP vector is the one 
  1114.      on the right.  In another way, the VP vector is clockwise from 
  1115.      the VE vector.  If the two vectors are reversed, the object 
  1116.      will appear invisble.  So you may have to experiment by 
  1117.      reversing them.  Note that the two vectors do not have to be 
  1118.      orthogonal.
  1119.  
  1120.  
  1121.                Triangle
  1122. t POSX POSY POSZ  VE_X VE_Y VE_Z  VP_X VP_Y VP_Z
  1123.      Same as for a parallelegram, except that the VE, VP vectors 
  1124.      define the two sides of the triangle.
  1125.  
  1126.  
  1127.                Fractal
  1128. x POSX POSY POSZ  POS1X POS1Y POS1Z  POS2X POS2Y POS2Z
  1129.      This is very much like a triangle, except that whereas the 
  1130.      second and third set of XYZ values for triangles are relative 
  1131.      to the base position of the triangle, for a fractal object all 
  1132.      three XYZ triples are absolute object space positions.
  1133.  
  1134.  
  1135.                Ring (annullus)
  1136. r CENTERX CENTERY CENTERZ VE_X VE_Y VE_Z  VP_X VP_Y VP_Z  MINRAD MAXRAD
  1137.      Rings are sort of like parallelograms.  The first triple 
  1138.      defines the center of the ring.  The VE and VP triples radiate 
  1139.      from that point and define the plane of the ring.  It is 
  1140.      undefined as to what happens if the two vectors are not 
  1141.      orthogonal.  MINRAD is the inside radius of the ring (which may 
  1142.      be zero, forming a disk); MAXRAD is the outside radius of the 
  1143.      ring.
  1144.  
  1145.  
  1146.                               -18-
  1147.  
  1148.  
  1149.  
  1150. The { and } command lines may be placed around any arbitrary set of 
  1151. object command lines.  This allows RENDER to do optimized ray 
  1152. tracing by calculating extent spheres around the indicated primitive 
  1153. objects and then checking ray intersections with the extent sphere 
  1154. rather than one-by-one with all the inner objects.  Extents may be 
  1155. nested.
  1156.  
  1157. File information
  1158. ~~~~~~~~~~~~~~~~~~~~~~~
  1159. The following files are included with this DBW_Render release:
  1160.  
  1161.      \bin     (or DBWREND1.ZIP)
  1162.           copying      - documentation (type: PRINT COPYING)
  1163.           read.me      -   "           (type: PRINT READ.ME)
  1164.           ray.doc          "           (type: PRINT RAY.DOC)
  1165.           ray.exe      - the ray tracer 
  1166.           display.exe  - the IBM VGA/MCGA display program
  1167.           brick.dat    - image source files (input to RAY.EXE)
  1168.           glass.dat        "
  1169.           glass1.dat       "
  1170.           glass2.dat       "
  1171.           glaslong.dat     "
  1172.           island.dat       "
  1173.           moonover.dat     " 
  1174.           brick.tmp    - display files (input to DISPLAY.EXE)
  1175.           glass.tmp        " 
  1176.           glass1.tmp       "
  1177.           glass2.tmp       "
  1178.           moonover.tmp     "
  1179.  
  1180.  
  1181.  
  1182.      \ray      (or DBWREND2.ZIP) 
  1183.           makeray    - uses Microsoft MAKE to build RAY.EXE
  1184.           ray.h      - all global definitaions
  1185.           ray.c      - main module of ray tracer
  1186.           val.c      - current intensity value of an object
  1187.           hit.c      - calculate if an object gets hit by a ray
  1188.           tex.c      - calculate the texture of an object
  1189.           ext.c      - handle extents ({,} commands)
  1190.           rnd.c      - random number table
  1191.           mth.c      - perform vector and matrix math
  1192.           fil.c      - file i/o
  1193.           int.c      - find intersections with objects
  1194.           cal.c      - top level object calculations
  1195.           makedisp   - uses Microsoft MAKE to build DISPLAY.EXE
  1196.           display.c  - main module of DISPLAY.EXE
  1197.           gifcompr.c - .GIF file creation for DISPLAY
  1198.  
  1199.  
  1200.  
  1201.  
  1202.  
  1203.  
  1204.  
  1205.  
  1206.                               -19-
  1207.