#include "colors.inc" light_source { <5,1,-40> color White } camera { location <0,0,-3.5> look_at <0,0,0> } background { color White } #declare pip = sphere { 0,.3 pigment { color White } } #declare pip_out = 1.25; #declare pip_lateral = .475; // create a superquadric ellipsoid shape // As the exponents approach 1.0, the edges get rounder #declare die6 = difference { superellipsoid { <0.25, 0.25> } //1 on top object { pip translate <0,pip_out,0> } //2 on back object { pip translate } object { pip translate <-pip_lateral,-pip_lateral,pip_out> } //3 on left side object { pip translate <-pip_out,-pip_lateral,pip_lateral> } object { pip translate <-pip_out,0,0> } object { pip translate <-pip_out,pip_lateral,-pip_lateral> } //4 on right side object { pip translate } object { pip translate } object { pip translate } object { pip translate } //5 on front object { pip translate } object { pip translate <-pip_lateral,-pip_lateral,-pip_out> } object { pip translate <0,0,-pip_out> } object { pip translate <-pip_lateral,pip_lateral,-pip_out> } object { pip translate } //6 on bottom object { pip translate <-pip_lateral,-pip_out,-pip_lateral>} object { pip translate <0,-pip_out,-pip_lateral>} object { pip translate } object { pip translate <-pip_lateral,-pip_out,pip_lateral>} object { pip translate <0,-pip_out,pip_lateral>} object { pip translate } scale .25 } #declare Counter = 1; union { #while (Counter <= 5) object { die6 rotate rotate <0,Counter*360/5,0> rotate <-45,0,0> translate <-2.45+Counter*4/5,0,0> } #declare Counter = Counter + 1; #end pigment { gradient x color_map { [0.0 color rgb <1,0,0>] [0.5 color rgb <0,1,0>] [1.0 color rgb <0,0,1>] } } }