home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / graphics / 9071 < prev    next >
Encoding:
Internet Message Format  |  1992-08-21  |  1.4 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!mips!mips!munnari.oz.au!comp.vuw.ac.nz!cavebbs!whare!frank
  2. From: frank@whare.cavebbs.welly.gen.nz (Frank van der Hulst)
  3. Newsgroups: comp.graphics
  4. Subject: Help: How to create a "Smooth Triangle" scene for POV
  5. Message-ID: <owLVPB3w165w@whare.cavebbs.welly.gen.nz>
  6. Date: 22 Aug 92 09:34:31 GMT
  7. Organization: Tech-Soft Systems, Wellington NZ
  8. Lines: 24
  9.  
  10. I have a set of points (triangles) representing a human head I've
  11. converted into the Persistence of Vision raytracer scene format. This
  12. looks OK, but I'd like to try using POV-ray's Smooth Triangle object
  13. type to improve how it looks. To do that I need to calculate the surface
  14. normal for each traingle. The POV-ray documentation says the following:
  15.  
  16.        2) If your original data was a polygon or triangle mesh,
  17.        then it's not quite so simple. You have to first calculate the
  18.        surface normals of all the triangles. This is easy to do - you
  19.        just use the vector cross-product of two sides (make sure you get
  20.        the vectors in the right order). Then, for every vertex, you
  21.        average the surface normals of the triangles that meet at that
  22.        vertex. These are the normals you use for smooth triangles. Look
  23.        for the utilities SANDPAPER and TXT2POV.
  24.  
  25. My questions:
  26. 1.  Can anyone give me a pointer to either of these utilities?
  27.  
  28. 2.  Failing that, how about a pointer to some code for calculating
  29.     vector cross-products?
  30.  
  31. Thanks.
  32.  
  33. Frank.
  34.