|
![](/i/fill.gif) |
Warp wrote:
> Josh English <eng### [at] spiritone com> 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
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
OOPS. I was looking at my bookmarks screen one one machine and typing on the
other....
It's fixed.
By the way, thank you for that read me file, it made my life very easy on
several occasions.
Josh
Warp wrote:
> By the way, the link at the beginning of the page is wrong.
> It's not "PovUntils" :)
>
> --
> main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
> ):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
|
![](/i/fill.gif) |