POV-Ray : Newsgroups : povray.general : Q: What is a degenerate triangle? : Re: Q: What is a degenerate triangle? Server Time
12 Aug 2024 11:16:59 EDT (-0400)
  Re: Q: What is a degenerate triangle?  
From: Nieminen Mika
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

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