POV-Ray : Newsgroups : povray.general : Q: What is a degenerate triangle? Server Time
12 Aug 2024 13:17:58 EDT (-0400)
  Q: What is a degenerate triangle? (Message 8 to 17 of 37)  
<<< Previous 7 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Alan Kong
Subject: Re: What is a degenerate triangle?
Date: 21 Mar 1999 06:49:46
Message: <36F4DC6B.9FDBC1AB@compuserveNO-SPAM.com>
Ken wrote:
>> It probably has something to do with the way it's parents raised it.

  It cross-dresses as a primitive. Looks kinda cute, actually <g>.

- Alan


Post a reply to this message

From: david sharp
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 09:47:40
Message: <36F50681.6E9@interport.net>
Nathan Kopp wrote:
 
[ ... ]
> This particular triangle works just fine with POV 3.1 for me.

As a smooth_triangle?
I am using 3.1d, DOS version, and that smooth_triangle is
reported degenerate. The points and normals are generated by 
macros and if I at least knew why it was degenerate (or being
reported as such) I could do automate some 'detect and correct', 
like substituting a 'flat' triangle (which works fine with 
those coordinates). 

> If you accidently typed something like:
> smooth_triangle{
>        v1,n1,
>         v2,n2,
>         v2,n3  // note this line
> }

Well, in my case, this is actually the most likely cause, 
but I cutnpasted directly from the source.


Post a reply to this message

From: david sharp
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 13:33:01
Message: <36F53B7A.33A7@interport.net>
Using POV version 3.1d for DOS, this triangle is not 
reported as degenerate as part of a mesh{}, but it 
is reported degenerate if declared by itself or as 
part of a union{}. However the triangle is not 
rendered properly in any of these (in a mesh, by itself, 
or in a union).
By making random changes in the normals, sometimes I can get 
it rendered, but what changes in the normals is allowing it 
to be rendered is a mystery to me. Some changes work, and 
some don't.

If it is declared as a plain triangle 
	triangle{v1,v2,v3}
then it is rendered ok.

david sharp wrote:
> #declare v1=<116.50351, 37.28418, -14.46650>;
> #declare n1=<-0.87727, -0.19526, 0.43849>;
> #declare v2=<73.18535, 44.36221, -1.11751>;
> #declare n2=<-0.90956, 0.27350, 0.31289>;
> #declare v3=<123.66611, 65.86183, 12.58927>;
> #declare n3=<-0.8777, -0.19526, 0.43849>;
> 
> smooth_triangle{
>         v1,n1,
>         v2,n2,
>         v3,n3     
> }


Post a reply to this message

From: Nieminen Mika
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 14:36:28
Message: <36f54a3c.0@news.povray.org>
I think I know what's the problem.
  Render the following scene:

#declare v1=<116.50351, 37.28418, -14.46650>;
#declare n1=<-0.87727, -0.19526, 0.43849>;
#declare v2=<73.18535, 44.36221, -1.11751>;
#declare n2=<-0.90956, 0.27350, 0.31289>;
#declare v3=<123.66611, 65.86183, 12.58927>;
#declare n3=<-0.8777, -0.19526, 0.43849>;

triangle { v1,v2,v3 pigment { rgb z } }
sphere { v1,1 pigment { rgb x } }
sphere { v2,1 pigment { rgb x } }
sphere { v3,1 pigment { rgb x } }
cylinder { v1,v2,.5 pigment { rgb y } }
cylinder { v2,v3,.5 pigment { rgb y } }
cylinder { v3,v1,.5 pigment { rgb y } }
cylinder { v1,v1+n1*50,.5 pigment { rgb x+y } }
cylinder { v2,v2+n2*50,.5 pigment { rgb x+y } }
cylinder { v3,v3+n3*50,.5 pigment { rgb x+y } }

#declare CamLookat=(v1+v2+v3)/3;
#declare CamPos=CamLookat+x*100-z*25;
camera { location CamPos look_at CamLookat angle 35 }
light_source { <1000,1000,-1000> 1 }
light_source { <0,0,1000> 1 }

  The vertices of the triangle are red spheres, the edges green cylinders
and the normals yellow cylinders (and the interior of the triangle is blue).
  You can see from the image, that two of the normals are pointing to one
side of the triangle while the third is pointing to the other side. This may
be causing the problem. I think that all the normals have to be pointing to
the same side of the triangle.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Nathan Kopp
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 15:57:29
Message: <36F55CDC.B67A12FF@Kopp.com>
david sharp wrote:
> 
> Well, in my case, this is actually the most likely cause,
> but I cutnpasted directly from the source.

Hmmm... that's odd since I cut and pasted from your previous post and
it worked.  I tried it with 3.1a official and my latest compile of
UVPov and both worked just fine (is 3.1d broken here?).

-Nathan


Post a reply to this message

From: david sharp
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 17:56:29
Message: <36F57933.7B@interport.net>
Nieminen Mika wrote:

[ ... ]
>   You can see from the image, that two of the normals are pointing to one
> side of the triangle while the third is pointing to the other side. This may
> be causing the problem. I think that all the normals have to be pointing to
> the same side of the triangle.

I will have to experiment with this, but that particular triangle
came from a list of thousands where I am pretty sure that are other 
places where the normals reverse from one end of a triangle to another
(but maybe not! I have to check), and all but that one rendered nicely.


Post a reply to this message

From: david sharp
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 18:47:19
Message: <36F58522.29ED@interport.net>
Nieminen Mika wrote:
>   You can see from the image, that two of the normals are pointing to one
> side of the triangle while the third is pointing to the other side. This may
> be causing the problem. I think that all the normals have to be pointing to
> the same side of the triangle.

This, in fact, seems to be, or was, the problem. That triangle was 
the only one,  of thousands, where the normals were reversed from 
one corner of the triangle to another, and it was the only triangle 
POV was not accepting. This is easy enough to detect and work around.

Thank you very much for your efforts and insights.

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)?


Post a reply to this message

From: Ken
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 19:28:53
Message: <36F58DE4.D45F7BFA@pacbell.net>
david sharp wrote:
> 
> Nieminen Mika wrote:
> >   You can see from the image, that two of the normals are pointing to one
> > side of the triangle while the third is pointing to the other side. This may
> > be causing the problem. I think that all the normals have to be pointing to
> > the same side of the triangle.
> 
> This, in fact, seems to be, or was, the problem. That triangle was
> the only one,  of thousands, where the normals were reversed from
> one corner of the triangle to another, and it was the only triangle
> POV was not accepting. This is easy enough to detect and work around.
> 
> Thank you very much for your efforts and insights.
> 
> 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)?

  In effect you are twisting it into a fourth demension when you have
 two normals pointing in the opposite direction of each other on one
 object.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: david sharp
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 20:20:13
Message: <36F59AE7.6AB0@interport.net>
Ken wrote:
> 
> david sharp 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)?
> 
>   In effect you are twisting it into a fourth demension when you have
>  two normals pointing in the opposite direction of each other on one
>  object.
> 

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: Gordon
Subject: Re: Q: What is a degenerate triangle?
Date: 21 Mar 1999 21:26:20
Message: <36f5aa4c.0@news.povray.org>
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>...
>Ken wrote:
>>
>> david sharp 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)?
>>
>>   In effect you are twisting it into a fourth demension when you have
>>  two normals pointing in the opposite direction of each other on one
>>  object.
>>
>
>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

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

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