POV-Ray : Newsgroups : povray.advanced-users : should be normal weighted ? Server Time
30 Jul 2024 04:21:47 EDT (-0400)
  should be normal weighted ? (Message 21 to 23 of 23)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Josh English
Subject: Re: should be normal weighted ?
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

From: Josh English
Subject: Re: should be normal weighted ?
Date: 7 Dec 2000 16:20:55
Message: <3A2FFF37.47FE1D19@spiritone.com>
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

From: Wlodzimierz ABX Skiba
Subject: Re: should be normal weighted ?
Date: 8 Dec 2000 07:35:58
Message: <3a30d5ae@news.povray.org>
Warp wrote in message <3a2fe6ad@news.povray.org>...
>  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...


than if this appear for both method (weighted and not)
than consider comparison for proper triangles
(picture sended at p.b.i)

ABX


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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