home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / demos / OpenGL / backtrace / README < prev    next >
Encoding:
Text File  |  1994-08-02  |  3.2 KB  |  68 lines

  1.  
  2.  
  3.                 THIS CODE RUNS/COMPILES ON 5.1 Irix OR LATER
  4.                 THIS CODE WILL NOT RUN ON LESS THAN 5.1 Irix
  5.  
  6.  
  7. ABOUT THIS PROGRAM:
  8.     Backtrace is an OpenGL program meant to simulate ray tracing.
  9. It displays a refractive sphere above a plane.  The sphere is lit by
  10. red, green, and blue spotlights which may be manually moved.  The
  11. shadow of the sphere and the light which is refracted through the
  12. sphere are projected onto the plane.
  13.     The "Material" menu controls the refractiveness of the sphere.
  14.     The "Draw" menu controls which subparts of the scene are
  15. drawn.  By default, the "Draw Texture" option is off.  Texture mapping
  16. is slow on many systems and the texture map is completely gratuitous.
  17. However, you may want to turn texture mapping on once to see if the
  18. performance is acceptable on your system.
  19.     The "Subdivision" menu controls the number of subdivisions
  20. used to draw the plane, the sphere, the lights, the shadows, and the
  21. refractions.  More subdivisions will look better, but will be slower.
  22.     The "Lights" menu can be used to turn the lights on and off on
  23. an individual basis.  The "Reset Lights" button moves all the lights
  24. back to their original positions.
  25.     The "Quick Motion" option under the option menu makes motions
  26. in r and phi (controlled by the middle and right mouse buttons,
  27. respectively) happen much more quickly by delaying recompuation of the
  28. shadows and refraction until the mouse button is released.  The
  29. "Rotate Automatically" toggle causes the lights to rotate about the z
  30. axis at random speeds.
  31.     Moving of the lights is accomplished with the mouse.  The
  32. author wishes to apologize for the horribly awkward interface.  To
  33. move a light, move the pointer over it and press one of the mouse
  34. buttons down.  Draw the mouse to move the light.  It is easiest to
  35. imagine the lights in spherical coordinates.  The left mouse button
  36. controls rotation in theta (about the z axis).  Moving the mouse
  37. horizontally while holding down the left mouse button will increase or
  38. decrease theta.  
  39.     The middle mouse button controls the radius, or the distance
  40. of the light from the sphere.  Dragging the mouse toward the center of
  41. the screen decreases the distance of the light from the sphere, while
  42. moving away from the center of the screen increases the distance.
  43.     The right mouse button controls rotation in phi, which can be
  44. thought of as the elevation of the light.  Moving the mouse
  45. horizontally will change the elevation.
  46.  
  47. TO COMPILE:
  48.         If you have not already done so, copy all files from the CDROM
  49. to a directory on your computer.
  50.         First, run the shell script UNCAP to get everything back from
  51. upper case letters.
  52.         Type "make."  Note that you must have a C++ compiler
  53. installed.  There may be a warning or two, but these should not cause
  54. problems.  You must first have compiled libGLw.a and libtk.a.  You
  55. must also have a development copy of Motif installed.
  56.  
  57. OTHER MAKEFILE TARGETS:
  58.         "make clean" removes objects, ~ files, and core files.
  59.         "make clobber" also removes the executable.
  60.  
  61. KNOWN BUGS:
  62.     It's possible to change the phi of a light in such a way that
  63. the light gets below the sphere, which leads to unexpected (and
  64. inaccurate) results.
  65.  
  66. AUTHOR:
  67.         Celeste Fowler
  68.