POV-Ray : Newsgroups : povray.general : Q: What is a degenerate triangle? Server Time
12 Aug 2024 11:23:43 EDT (-0400)
  Q: What is a degenerate triangle? (Message 18 to 27 of 37)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Margus Ramst
Subject: Re: Q: What is a degenerate triangle?
Date: 22 Mar 1999 03:26:49
Message: <36F5FEC7.CE83AA3D@peak.edu.ee>
I'm not a programmer type and I might be wrong, but there seems to be a
problem of ambiguity. This is how I envision it: the normals of a smooth
triangle are calculated via interpolation of its 3 corner normals. When one
normal is rotated more than 180 degrees in relation to the others, how
should POV know which way to do the interpolated rotation? Bad ASCII art:

 |   /
--- --- ---
         \

 |   \
--- --- --- ---
         /   \

The end result is the same, but the intermediate normals are different. As
long as the angle difference is less than 180 degrees there is no ambiguity.

Margus

Gordon wrote:
> 
> It does seem strange to me as well. In the particle system I am working on,
> I'm using smooth triangles as the particles. I calculate normals that point
> at 90 degrees to the average normal of the triangle. These normals are
> parallel to the surface and have had no error mesages like this.
> 
> Any programmer types who get into the POV code care to explain in detail?
> 
> Thanks
> Gordon
> 
> david sharp wrote in message <36F### [at] interportnet>...
> >
> >fourth dimension?
> >a ball doesn't have to twist into a fourth dimension to have
> >normals pointing in *every* direction.
> >
> >Since Nathan Kopp posted that at least that one triangle was OK with
> >POV-Ray 3.1a, I find this still mysterious.


Post a reply to this message

From: Margus Ramst
Subject: Re: Q: What is a degenerate triangle?
Date: 22 Mar 1999 04:45:39
Message: <36F61143.2A029943@peak.edu.ee>
Upon furter meditation, this is not quite right. Ken's 4D argument is
correct. The sphere has normals pointing in all directions, but all normals
point to the same side of it's surface, by default the "outside". For an
object to have it's "inside" and "outside" on the same surface, it wold have
to be twisted in 4D (e.g. the Klein bottle, the 4D equivalent of the Moebius
band). This also happens when a smooth triangle's normals go from "up" at
one corner to "down" in the other.
The ambiguity problem I still applies, but a clearer definition is: when a
corner normal differs more than 90 degrees from the general normal (defined
by the corners of the triangle), POV cannot tell which way to do the
interpolation - is the surface concave? Or convex?

Margus

Margus Ramst wrote:
> 
> I'm not a programmer type and I might be wrong, but there seems to be a
> problem of ambiguity. This is how I envision it: the normals of a smooth
> triangle are calculated via interpolation of its 3 corner normals. When one
> normal is rotated more than 180 degrees in relation to the others, how
> should POV know which way to do the interpolated rotation? Bad ASCII art:
> 
>  |   /
> --- --- ---
>          \
> 
>  |   \
> --- --- --- ---
>          /   \
> 
> The end result is the same, but the intermediate normals are different. As
> long as the angle difference is less than 180 degrees there is no ambiguity.
> 
> Margus
>


Post a reply to this message

From: Ken
Subject: Re: Q: What is a degenerate triangle?
Date: 22 Mar 1999 06:06:57
Message: <36F62371.1857CC40@pacbell.net>
Margus Ramst wrote:
> 
> Upon furter meditation, this is not quite right. Ken's 4D argument is
> correct. The sphere has normals pointing in all directions, but all normals
> point to the same side of it's surface, by default the "outside". For an
> object to have it's "inside" and "outside" on the same surface, it wold have
> to be twisted in 4D (e.g. the Klein bottle, the 4D equivalent of the Moebius
> band). This also happens when a smooth triangle's normals go from "up" at
> one corner to "down" in the other.
> The ambiguity problem I still applies, but a clearer definition is: when a
> corner normal differs more than 90 degrees from the general normal (defined
> by the corners of the triangle), POV cannot tell which way to do the
> interpolation - is the surface concave? Or convex?
> 
> Margus

  I was taking a shot in the dark with that reply but it just so happens
that I was reading up on the klien bottle last night before I responded
and that is what prompted me to think that it might be a case of twisting
it being twisted in a "4th" dimension. I can't think of any other way to
have two opposing sides of a flat surface connected to each other. Looks
like I got lucky this time.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Margus Ramst
Subject: Re: Q: What is a degenerate triangle?
Date: 22 Mar 1999 06:26:38
Message: <36F628E5.750B7B8F@peak.edu.ee>
Well, yes and no. Remember, we are dealing with surface normals _only_ in
this case. The triangle has no inside/outside. In theory the normals could
flip from one side of the triangle to the other, POV wouldn't give a damn.
It would simply result in a strange jump in lighting.
By the way, CSG objects often have surface normals pointing both in and out
(as a result of the difference operation). This creates problems only in
very specific cases, like using the trace() funcion to do something based on
the surface normal (creating furry CSG is a bitch :)
The Julia fractal is a 4D object. Rendering 4D objects isn't all that
difficult, but it would have to be a 3D "slice" of the object, so result are
hard to predict.

I think the real problem is that of ambiguity, which I described.

Also, I notice that I'm in a talkative mood today.

Margus

Ken wrote:
/.../
> have two opposing sides of a flat surface connected to each other. Looks
> like I got lucky this time.
> 
> --
> Ken Tyler
> 
> mailto://tylereng@pacbell.net


Post a reply to this message

From: david sharp
Subject: Re: Q: What is a degenerate triangle?
Date: 22 Mar 1999 11:03:43
Message: <36F669FC.55A5@interport.net>
Ken wrote:
[ ... ]
>				 I can't think of any other way to
> have two opposing sides of a flat surface connected to each other. Looks
> like I got lucky this time.


The normals are at different corners, not the same place.
The normals are, 'by definition', coming out of the same side of the 
triangle. If they are going in opposite directions, that, I thought,
is just supposed to mean that the expected surface (not the actual
triangle
defined by the vertices) bends around that much.


Post a reply to this message

From: Gordon
Subject: Re: Q: What is a degenerate triangle?
Date: 22 Mar 1999 23:07:24
Message: <36f7137c.0@news.povray.org>
david sharp wrote in message <36F### [at] interportnet>...
>Ken wrote:
>[ ... ]
>> I can't think of any other way to
>> have two opposing sides of a flat surface connected to each other. Looks
>> like I got lucky this time.
>
>
>The normals are at different corners, not the same place.
>The normals are, 'by definition', coming out of the same side of the
>triangle. If they are going in opposite directions, that, I thought,
>is just supposed to mean that the expected surface (not the actual
>triangle
>defined by the vertices) bends around that much.

That was also my interpretation. The image I have in mind is a short piece
of ribbon twisted so that one end is 180 degress to the other.

Gordon


Post a reply to this message

From: david sharp
Subject: Re: Q: What is a degenerate triangle?
Date: 22 Mar 1999 23:53:50
Message: <36F71E79.5501@interport.net>
Gordon wrote:

[ ... ]
>			The image I have in mind is a short piece
> of ribbon twisted so that one end is 180 degress to the other.


Which is what motivated the question in the first place!:
	http://www.interport.net/~dsharp/
(about the middle of the page)


Post a reply to this message

From: Ron Parker
Subject: Re: Q: What is a degenerate triangle?
Date: 23 Mar 1999 11:04:25
Message: <36f7bb89.0@news.povray.org>
On Sun, 21 Mar 1999 18:47:47 -0500, david sharp <dsh### [at] interportnet> wrote:
>Now, my question is why does POV-Ray do that? What is wrong with
>one normal pointing 'up' while two point 'down' (or vice versa)?

I guess I should reply to this one, since I submitted the bug 
report that got these classified as degenerate triangles. :)
The problem is, those triangles cause division by zero errors
on Alpha processors.  There is no way to have the normal go 
from "positive" to "negative" without going through zero, so 
there is always a curve on such a triangle where the normal
is undefined.  Since POV always needs a valid normal to compute
shading, that's a bad thing.  

If you want to see the original discussion that caused this, 
you'll have to go back a few months on povray.programming.


Post a reply to this message

From: Mathias Broxvall
Subject: Re: Q: What is a degenerate triangle?
Date: 23 Mar 1999 11:09:53
Message: <36F7BCD1.11B93FD4@ida.liu.se>
Ken wrote:
> I can't think of any other way to
> have two opposing sides of a flat surface connected to each other.

How about a muebius strip (spelling?), the band with only one surface.
Perhaps the problem is that if you interpolate normals pointing to
different
sides of the surface there will exist a point on the triangle with the
normal <0,0,0> which of course messes things up....

/ Mathias Broxvall


Post a reply to this message

From: david sharp
Subject: Re: Q: What is a degenerate triangle?
Date: 23 Mar 1999 12:47:08
Message: <36F7D3B9.1D3@interport.net>
Ron Parker wrote:
[ ... ]
> The problem is, those triangles cause division by zero errors
> on Alpha processors.  There is no way to have the normal go
> from "positive" to "negative" without going through zero, so
> there is always a curve on such a triangle where the normal
> is undefined.  Since POV always needs a valid normal to compute
> shading, that's a bad thing.


Hmmmm, I just assumed that POV was rotating the normals from one 
triangle corner to the next, in which case I don't see any 'zero' 
normal. 
Your comment makes me believe that what POV does is interpolate the 
vector coefficients independently.
(ie, n1.x -> n2.x, n1.y -> n2.y, n1.z -> n2.z linearly, not rotating
the normal).
(or does this question just demonstrate my complete misunderstanding)


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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