home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 2555 / povhlp / triangle.hlp < prev    next >
Encoding:
Text File  |  1994-07-04  |  1.8 KB  |  36 lines

  1.     The triangle primitive is available in order to make more complex objects
  2.  than the built-in shapes will permit.  Triangles are usually not created by
  3.  hand, but are converted from other files or generated by utilities.
  4.  
  5.     A triangle is defined by:
  6.        triangle { <CORNER1>, <CORNER2>, <CORNER3> }
  7.  where <CORNERn> is a vector defining the x,y,z coordinates of each corner of
  8.  the triangle.
  9.  
  10.     Because triangles are perfectly flat surfaces it would require extremely
  11.  large numbers of very small triangles to approximate a smooth, curved sur-
  12.  face.  However much of our perception of smooth surfaces is dependent upon
  13.  the way light and shading is done.  By artificially modifying the surface
  14.  normals we can simulate as smooth surface and hide the sharp-edged seams
  15.  between individual triangles.
  16.  
  17.     The smooth_triangle primitive is used for just such purposes and use a
  18.  formula called Phong normal interpolation to calculate the surface normal
  19.  for any point on the triangle based on normal vectors which you define for
  20.  the three corners.  This makes the triangle appear to be a smooth curved
  21.  surface.  A smooth_triangle is defined by:
  22.        smooth_triangle {
  23.           <CORNER1>, <NORMAL1>,
  24.           <CORNER2>, <NORMAL2>,
  25.           <CORNER3>, <NORMAL3>
  26.        }
  27.  where the corners are defined as in regular triangles and <NORMALn> is a
  28.  vector describing the direction of the surface normal at each corner.
  29.  
  30.     These normal vectors are prohibitively difficult to compute by hand.
  31.  Therefore smooth_triangles are almost always generated by utility programs.
  32.  To achieve smooth results, any triangles which share a common vertex should
  33.  have the same normal vector at that vertex.  Generally the smoothed normal
  34.  should be the average of all the actual normals of the triangles which share
  35.  that point.
  36.