#include "colors.inc" light_source { <0, 10, -100> color White } camera { location <0, 1, -2> look_at <0, 0, 0> } background { color White } //configure our die's shape #declare diesides = 5; #declare dieheight = .5; #declare dierotate = -37; #declare siderotate = 360/diesides; #declare currentside = diesides; #declare diehalf = intersection { #while (currentside > 0) plane { z, 0 rotate rotate <0,siderotate*currentside,0> translate <0,dieheight,0> } #declare currentside = currentside - 1; #end } #declare die10shape = intersection { object { diehalf } object { diehalf scale <1,-1,1> rotate <0, siderotate/2, 0> } } #declare top_numbers = array[5] {"0", "4", "6", "2", "8"} #declare bottom_numbers = array[5] {"7", "1", "9", "5", "3"} #declare die10 = difference { object { die10shape } #declare currentside = diesides; #while (currentside > 0) #declare topnum = top_numbers[currentside-1] #declare botnum = bottom_numbers[currentside-1] //the top numbers text { ttf "timrom", topnum dieheight/10, 0 translate <-.25,0,0> scale .35 scale <-1,1,1> translate <0, 0, dieheight/1.6> rotate translate <0, -dieheight*.3,.08> rotate <0,-siderotate*currentside,0> pigment { color Black } } //the bottom numbers text { ttf "timrom" botnum dieheight/10, 0 translate <-.25,0,0> scale .35 scale <-1,1,1> translate <0,0, dieheight/1.6> rotate <-dierotate,0,0> translate <0, -dieheight*.18, -.1> rotate <0, 180-siderotate*currentside,0> pigment { color Black } } #declare currentside = currentside - 1; #end bounded_by { sphere { 0, dieheight } } } #declare diecount = 3; #while (diecount > 0) object { die10 rotate <0,diecount*120,0> rotate translate texture { pigment { color Green } } } #declare diecount = diecount-1; #end