#include "colors.inc" // Look down on the pyramid camera { location <1.0, 1.5, 0.0> look_at <0.0, 0.2, 1.0> } // A cracked light, light blue surface #declare CubeCMap = color_map { [0.00 rgbft <0.7, 0.8, 1.0, 0.0, 0.5>] [0.35 rgbft <0.7, 0.8, 1.0, 0.0, 0.5>] [0.40 rgbft <0.7, 0.8, 1.0, 0.5, 0.5>] [0.60 rgbft <0.7, 0.8, 1.0, 1.0, 0.5>] [1.00 rgbft <0.7, 0.8, 1.0, 1.0, 0.5>] } // A cracked light blue surface #declare SphereCMap = color_map { [0.00 rgbft <0.2, 0.4, 0.9, 0.0, 0.5>] [0.35 rgbft <0.2, 0.4, 0.9, 0.0, 0.5>] [0.40 rgbft <0.2, 0.4, 0.9, 0.5, 0.5>] [0.60 rgbft <0.2, 0.4, 0.9, 1.0, 0.5>] [1.00 rgbft <0.2, 0.4, 0.9, 1.0, 0.5>] } // A cube is... #declare Cube = union { // A glow light_source { <0.5, 0.5, 0.5> color White } // A sphere surrounding it sphere { <0.5, 0.5, 0.5>, 0.5 texture { pigment { granite color_map {SphereCMap} turbulence 0.5 } finish {ambient 0} } } // And a box encasing it box { <0.0, 0.0, 0.0>, <1.0, 1.0, 1.0> texture { pigment { granite color_map {CubeCMap} turbulence 0.5 } finish {ambient 0.5} } } // There are cylinders framing the box with spheres at the corners union { cylinder {<0, 0, 0>, <1, 0, 0>, 0.05} cylinder {<0, 0, 1>, <1, 0, 1>, 0.05} cylinder {<0, 1, 0>, <1, 1, 0>, 0.05} cylinder {<0, 1, 1>, <1, 1, 1>, 0.05} cylinder {<0, 0, 0>, <0, 0, 1>, 0.05} cylinder {<1, 0, 0>, <1, 0, 1>, 0.05} cylinder {<0, 1, 0>, <0, 1, 1>, 0.05} cylinder {<1, 1, 0>, <1, 1, 1>, 0.05} cylinder {<0, 0, 0>, <0, 1, 0>, 0.05} cylinder {<1, 0, 0>, <1, 1, 0>, 0.05} cylinder {<0, 0, 1>, <0, 1, 1>, 0.05} cylinder {<1, 0, 1>, <1, 1, 1>, 0.05} sphere {<0, 0, 0>, 0.05} sphere {<0, 0, 1>, 0.05} sphere {<0, 1, 0>, 0.05} sphere {<0, 1, 1>, 0.05} sphere {<1, 0, 0>, 0.05} sphere {<1, 0, 1>, 0.05} sphere {<1, 1, 0>, 0.05} sphere {<1, 1, 1>, 0.05} texture { pigment {rgb <0.85, 0.85, 0.10>} finish { metallic ambient 0.2 diffuse 0.7 brilliance 6 reflection 0.25 } } } scale <0.2, 0.2, 0.2> } // Make a pyramid of cubes #local zloc = 0; #while (zloc < 5) #local yloc = 0; #while (yloc < 5) #local xloc = 0; #while (xloc < 5) #if (yloc <= zloc - xloc) object { Cube translate * 0.2 } #end #local xloc = xloc + 1; #end #local yloc = yloc + 1; #end #local zloc = zloc + 1; #end // Make three backdrop walls plane { z, 0 pigment {color White} translate 1 * z } plane { y, 0 pigment {color White} } plane { x, 0 pigment {color White} } // Make three more off-camera backdrop walls plane { z, 0 pigment {color White} translate -2 * z } plane { y, 0 pigment {color White} translate 2 * y } plane { x, 0 pigment {color White} translate 2 * x }