POV-Ray : Newsgroups : povray.bugreports : polygon with overlap : polygon with overlap Server Time
29 Apr 2024 06:32:05 EDT (-0400)
  polygon with overlap  
From: Le Forgeron
Date: 4 Jan 2011 15:22:00
Message: <4d238168$1@news.povray.org>
Greetings,

Can someone check if I made any error on the following script:
It should render [step] nested polygons of [num] sides.
But the rendered picture is bogus for me (both 3.6 & 3.7).
I searched the bugs site, but found no match for polygon.


#default { texture { pigment { rgb 1 }finish { ambient 1.0} } }

camera { orthographic
	up 3.5*y
  right 3.5*x*image_width/image_height
  location  <0,0,-4>
  look_at   <0,0,0>
}

#declare num=5;
#declare step=5;
#macro aa(xx,yy,a)

polygon { (num+1)*step,
#local j=0.70;
#while(j>0.01)
#local i=0;
#while(i<num+1)
  j*< cos(i*2*pi/num),sin(i*2*pi/num),0>
#local i=i+1;
#end
#local j=j-0.7/step;
#end
translate <xx-0.0,yy,0>
 }
#end

aa(0,0,0)


Post a reply to this message

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