/* PovRay scene that creates Waterman structures based upon any geometric primitive. The platonic solids are given here but it is easy to modify so that it #includes any PovRay model. Note: the geometric model will have to be scaled to fit. Written and tested using PovRay 3.5 */ /* Change the next two as desired */ #declare ROOT = 7; #declare PRIMITIVE = 4; /* Current primitive numbers are as follows 1 - sphere 2 - cube 3 - octahedron 4 - icosahedron 5 - dodecahedron */ #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 { #switch (PRIMITIVE) #case (2) //#include "cube.pov" box { <-1,-1,-1>, <1,1,1> } scale 0.5 #break #case (3) #include "octahedron.pov" scale sqrt(2) #break #case (4) #include "icosahedron.pov" scale sqrt(2) #break #case (5) #include "dodecahedron.pov" scale 0.5*(1+sqrt(5))/2 #break #else sphere { <0,0,0>, 1 } scale 1/sqrt(2.0) #end texture { pigment { #if (ix*ix + iy*iy + iz*iz = RADIUS2) color rgb <0.4,0.4,1> #else color rgb <1.0,0.4,0.4> #end } finish { specular 0.2 } } translate } #end #end #declare iz = iz + 1; #end #declare iy = iy + 1; #end #declare ix = ix + 1; #end