POV-Ray : Newsgroups : povray.advanced-users : should be normal weighted ? : Re: should be normal weighted ? Server Time
30 Jul 2024 04:11:41 EDT (-0400)
  Re: should be normal weighted ?  
From: Josh English
Date: 7 Dec 2000 16:19:43
Message: <3A2FFEEC.511BBC56@spiritone.com>
Warp wrote:

> Josh English <eng### [at] spiritonecom> wrote:
> : Better Nate than Lever... I have a small explination that hopefully will
> : help out here:
>
> : http://www.spiritone.com/~english/cyclopedia/smooth2.html
>
>   Note that if you use a weighted average to smooth the triangles, you can
> get degenerate triangles. This is a bad problem.
>
>   For example, suppose that you have a triangle with a normal vector
> pointing at <0,1,0> and an adjacent triangle with its normal vector pointing
> at <1,-1,0>. Let's say that the area of the first triangle is 10 square
> units and the area of the second triangle is 1 square unit.
>   If we calculate the normal vector of a common vertex using the weighted
> average of the triangle normal vectors, it will be:
>
>   <0,1,0>*10 + <1,-1,0>*1 = <1,9,0>
>
>   If you apply that <1,9,0> as the normal vector to a vertex of the second
> triangle, it will be degenerate. That's because the angle between the
> normal vector of the second triangle and that <1,9,0> vector is larger
> than 90 degrees.
>   (It can be checked from the dot-product; if the dot-product of the
> two vectors is negative, then the triangle is degenerate:
>   <1,-1,0>.<1,9,0> = 1*1 + (-1)*9 + 0*0 = -8  )

Thanks for the tip on that. I didn't associate negative dot products with
degenerate triangles. So is it always true that a negative dot product reflects
an obtuse angle?  A cursory check would make it seem that way.

>   By the way: It's interesting to note that this same problem can appear
> even if we use the average of the normalized normal vectors of the triangles.
>   I have never thoight about that...
>
>   However, I would say that the problem is less probable in the latter case.

No, sadly, it's not. I got several degenerate triangles, then I changed n to be
5 or 6, it worked, set it back to 4, and it worked. I have no idea why it did
that, though. This was when the normal at the apex of the triangles was along
<0,1,0>.

Josh


Post a reply to this message

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