POV-Ray : Newsgroups : povray.general : Calculating the normals of a triangle : Re: Calculating the normals of a triangle Server Time
5 Aug 2024 12:21:20 EDT (-0400)
  Re: Calculating the normals of a triangle  
From: Tor Olav Kristensen
Date: 11 Sep 2002 10:20:03
Message: <web.3d7f50003836a27fedbc6d4c0@news.povray.org>
Warp wrote:
>Marcus Fritzsch <m### [at] fritschyde> wrote:
>> i wrote a simple triangulation algo for a noise program to generate
>> something like a hieghtfield, and i wanted to use this with
>> smooth_triangles, does anybody knows how to calculate the normals of the
>> three points from the known triangle?
>
>  There are basically two ways:
......

......
>  2. If you don't know the function, or the function is not differentiable
>(or it's just too difficult to do so), then you can use an approximation
>which works quite well for (almost) any mesh: The normal vector at a vertex
>point is the sum of all the normal vectors of the triangles sharing that
>vertex.
>  (The normal vector of a triangle can be calculated with the cross-product
>of two of its edges. According to empirical tests, *not* normalizing these
>normals gives the best result in the sum described above (because the
>dot-product of the two edges of a triangle gives a normal vector which
 ^^^
I guess you meant to write 'cross-product' here ;)


>length is equal to the area of the triangle, and not normalizing this
>vector means that a larger triangle has more effect in the normal of the
>vertex than other smaller triangles sharing that same vertex, which
>reportedly gives better results).)
>...


Tor Olav


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.