/* PovRay scene that creates Waterman polyhedra from other Waterman polyhedra. This is achieved by #including the polyhedra in either "s" or "p" form, sphere or polyhedra.....complete set of "s" and "p" forms are provided for root betwene 1 and 50. Written and tested using PovRay 3.5 */ #include "metals.inc" #include "colors.inc" #include "finish.inc" /* Change the root as desired */ #declare ROOT = 6; /* Root and name o file to be include eg: p0004.pov or s0004.pov */ #declare ROOT2 = 6; #declare PRIMITIVE = "s0006.pov"; #declare SCALE = sqrt(2*(ROOT2-1)); #declare RADIUS2 = 2 * ROOT; #declare RADIUS = sqrt(RADIUS2); #declare vp = 0.7*<3*(RADIUS+0.5),(RADIUS+0.5),(RADIUS+0.5)>; camera { location vp up y right -x*image_width/image_height angle 60 sky <0,0,1> look_at <0,0,0> } global_settings { assumed_gamma 1.0 } light_source { <3*RADIUS,RADIUS,2*RADIUS> color rgb <1,1,1> } #declare IR = int(RADIUS2+1); #declare ix = -IR; #while (ix <= IR) #declare iy = -IR; #while (iy <= IR) #declare iz = -IR; #while (iz <= IR) #if (mod(ix+iy+iz,2) = 0) #if (ix*ix + iy*iy + iz*iz <= RADIUS2) #debug "o" object { #include PRIMITIVE scale 0.5 * sqrt(2) / SCALE translate } #end #end #declare iz = iz + 1; #end #declare iy = iy + 1; #end #declare ix = ix + 1; #end