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