#declare SEED = seed(12345); global_settings { ambient_light <1,1,1> max_trace_level 6 assumed_gamma 1.8 } // Lights light_source { VP color rgb <1,1,1>/2 } light_source { VP + <0,0,100> color rgb <1,1,1> } // Sky sky_sphere { pigment { gradient <0,0,1> color_map { [0 color rgb <0,1,1>] [1 color rgb <0,0,1>] } } } // Ground plane, 1m grid plane { <0,0,1>, -0.01 texture { pigment { color rgb <0.75,0.75,0.75> } } } #declare CHECKER1 = texture { pigment { checker color rgb <0.3,0.3,0.3> color rgb <0.8,0.8,0.8> scale 1 } finish { diffuse 0.6 ambient 0.1 specular 0 } } disc { <0,0,0>, <0,0,1>, 20 texture { CHECKER1 } } // Ground markers at constant angle at the screen-floor union { #declare i = 0; #while (i < 18) #declare theta = i * 2 * pi / 18; sphere { <0,0,0>, 0.05 translate 0.5*CYLHEIGHT/tan(radians(ODSP_vfov/2))* } #declare i = i + 1; #end texture { pigment { colour rgb <0.8,0.8,0.8> } finish { ambient 0.1 diffuse 0.7 specular 0.4 } } } // Wire grid, 1m spacing at a fixed distance #declare THETA = 0; #declare DTHETA = 10; #declare RR = 0.0075; #declare GRIDTEXTURE = texture { pigment { color rgb <0.75,0.75,0.75> } finish { ambient 0.1 diffuse 0.4 ambient 0.4 } } // Verticals union { #while (THETA < 359) cylinder { , , RR no_shadow } #declare THETA = THETA + DTHETA; #end texture { GRIDTEXTURE } } // Horizontals #declare DTHETA = 2; #declare DDZ = 0.6; union { #declare DZ = 0; #while (DZ <= CYLHEIGHT) #declare THETA = 0; #while (THETA < 359) cylinder { , , RR no_shadow } #declare THETA = THETA + DTHETA; #end #declare DZ = DZ + DDZ; #end texture { GRIDTEXTURE } } // Small axes at mid height half way to the screen union { cylinder { <0,CYLRADIUS/2,CYLHEIGHT/2>, <0,CYLRADIUS/2,CYLHEIGHT/2+0.5>,0.02 } cone { <0,CYLRADIUS/2,CYLHEIGHT/2+0.5>,0.04, <0,CYLRADIUS/2,CYLHEIGHT/2+0.7>,0.0 } texture { pigment { colour rgb <0,1,0> } finish { ambient 0.1 diffuse 0.8 ambient 0.2 } } } union { cylinder { <0,CYLRADIUS/2,CYLHEIGHT/2>, <0.5,CYLRADIUS/2,CYLHEIGHT/2>,0.02 } cone { <0.5,CYLRADIUS/2,CYLHEIGHT/2>,0.04, <0.7,CYLRADIUS/2,CYLHEIGHT/2>,0.0 } texture { pigment { colour rgb <1,0,0> } finish { ambient 0.1 diffuse 0.8 ambient 0.2 } } } union { cylinder { <0,CYLRADIUS/2,CYLHEIGHT/2>, <0,CYLRADIUS/2+0.5,CYLHEIGHT/2>,0.02 } cone { <0,CYLRADIUS/2+0.5,CYLHEIGHT/2>,0.04, <0,CYLRADIUS/2+0.7,CYLHEIGHT/2>,0.0 } texture { pigment { colour rgb <0,0,1> } finish { ambient 0.1 diffuse 0.8 ambient 0.2 } } } #declare CHECKERRED = texture { pigment { checker color rgb <0.35,0.3,0.3> color rgb <1.0,0.8,0.8> scale 0.25 } finish { diffuse 0.6 ambient 0.1 specular 0 } } #declare CHECKERGREEN = texture { pigment { checker color rgb <0.3,0.35,0.3> color rgb <0.8,1.0,0.8> scale 0.25 } finish { diffuse 0.6 ambient 0.1 specular 0 } } #declare CHECKERBLUE = texture { pigment { checker color rgb <0.3,0.3,0.35> color rgb <0.8,0.8,1.0> scale 0.25 } finish { diffuse 0.6 ambient 0.1 specular 0 } } // Unit cubes at 3m distance #declare i = 0; #while (i < 6) #declare theta = i * 60; box { <-1,-1,-1>/2,<1,1,1>/2 texture { CHECKERRED } rotate <90*rand(SEED),0,0> rotate <0,90*rand(SEED),0> rotate <0,0,90*rand(SEED)> #switch (i) #case (0) rotate <0,0,clock*360> #break #case (1) rotate <0,clock*360,0> #break #case (2) rotate #break #case (3) rotate <0,0,-clock*360> #break #case (4) rotate <0,-clock*360,0> #break #case (5) rotate <-clock*360,0,0> #break #end translate <3,0,CYLHEIGHT/2> rotate <0,0,theta> } #declare i = i + 1; #end // Cylinders at 4m distance #declare i = 0; #while (i < 6) #declare theta = 20 + i * 60; cylinder { <0,0,-1>/4,<0,0,1>/4,0.5 texture { CHECKERGREEN } rotate <80*(rand(SEED)-0.5),0,0> rotate <0,0,90*rand(SEED)> #switch (i) #case (0) rotate <0,0,-clock*360> #break #case (1) rotate <0,-clock*360,0> #break #case (2) rotate <-clock*360,0,0> #break #case (3) rotate <0,0,clock*360> #break #case (4) rotate <0,clock*360,0> #break #case (5) rotate #break #end translate <4,0,CYLHEIGHT/2> rotate <0,0,theta> } #declare i = i + 1; #end // Cones at 5m distance #declare i = 0; #while (i < 6) #declare theta = 30 + i * 60; cone { <0,0,-1>/2,0.5,<0,0,1>/2,0.0 texture { CHECKERBLUE } rotate <100*(rand(SEED)-0.5),0,0> rotate <0,0,90*rand(SEED)> #switch (i) #case (0) rotate <0,0,clock*360> #break #case (1) rotate <0,clock*360,0> #break #case (2) rotate #break #case (3) rotate <0,0,-clock*360> #break #case (4) rotate <0,-clock*360,0> #break #case (5) rotate <-clock*360,0,0> #break #end translate <5,0,1.25*CYLHEIGHT/2> rotate <0,0,theta> } #declare i = i + 1; #end // Spheres at infinity #declare i = 0; #while (i < 360) #declare j = -5; #while (j > -26) sphere { <0,0,0>, 0.5 translate <100,0,0> rotate <0,j+5*(rand(SEED)-0.5),0> rotate <0,0,i+10*(rand(SEED)-0.5)> texture { pigment { colour rgb <1.0-0.2*rand(SEED),0.5*rand(SEED),0.5*rand(SEED)> } finish { ambient 0.2 diffuse 0.8 specular 0.2 } } } #declare j = j - 5; #end #declare i = i + 10; #end