scene { options { ambient_occlusion 3 multisample 3 exposure 1.2 } camera { position <5, -13, 9> look_at <0, 0, 2> } light { position <10, -12, 8> radius 0.2 jitter 4 } plane { position <0, 0, 1>, 0 material { color <0, 0.5, 0.1> } } # define a reusable Die type define shape Die subtract { union { box { size <1, 0.8, 0.8> } box { size <0.8, 1, 0.8> } box { size <0.8, 0.8, 1> } cyl { size <0.1, 0.1, 0.8> translate <0.4, 0.4, -0.4> } cyl { size <0.1, 0.1, 0.8> translate <0.4, -0.4, -0.4> } cyl { size <0.1, 0.1, 0.8> translate <-0.4, 0.4, -0.4> } cyl { size <0.1, 0.1, 0.8> translate <-0.4, -0.4, -0.4> } cyl { size <.1, .1, .8> translate <.4, -.4, .4> rotate -90, <1, 0, 0> } cyl { size <.1, .1, .8> translate <.4, -.4, -.4> rotate -90, <1, 0, 0> } cyl { size <.1, .1, .8> translate <-.4, -.4, .4> rotate -90, <1, 0, 0> } cyl { size <.1, .1, .8> translate <-.4, -.4, -.4> rotate -90, <1, 0, 0> } cyl { size <.1, .1, .8> translate <.4, -.4, .4> rotate -90, <0, 1, 0> } cyl { size <.1, .1, .8> translate <.4, -.4, -.4> rotate -90, <0, 1, 0> } cyl { size <.1, .1, .8> translate <.4, .4, .4> rotate -90, <0, 1, 0> } cyl { size <.1, .1, .8> translate <.4, .4, -.4> rotate -90, <0, 1, 0> } define shape Corner sphere { radius 0.1 } translate <.4, .4, .4> { shape Corner } translate <.4, .4, -.4> { shape Corner } translate <.4, -.4, .4> { shape Corner } translate <.4, -.4, -.4> { shape Corner } translate <-.4, .4, .4> { shape Corner } translate <-.4, .4, -.4> { shape Corner } translate <-.4, -.4, .4> { shape Corner } translate <-.4, -.4, -.4> { shape Corner } material { color <1, 0.4, 1> transparency 0.4 } } union { define shape Pip sphere { radius 0.1 } translate <0, -.5, 0> { shape Pip } translate <-.5, .25, -.25> { shape Pip } translate <-.5, -.25, .25> { shape Pip } translate <0, 0, -.5> { shape Pip } translate <.25, -.25, -.5> { shape Pip } translate <-.25, .25, -.5> { shape Pip } translate <-.25, -.25, .5> { shape Pip } translate <-.25, .25, .5> { shape Pip } translate <.25, -.25, .5> { shape Pip } translate <.25, .25, .5> { shape Pip } translate <.5, 0, 0> { shape Pip } translate <.5, .25, .25> { shape Pip } translate <.5, .25, -.25> { shape Pip } translate <.5, -.25, .25> { shape Pip } translate <.5, -.25, -.25> { shape Pip } translate <.25, .5, 0> { shape Pip } translate <.25, .5, -.25> { shape Pip } translate <.25, .5, .25> { shape Pip } translate <-.25, .5, 0> { shape Pip } translate <-.25, .5, -.25> { shape Pip } translate <-.25, .5, .25> { shape Pip } material { color <1, 1, 1> } } } # Define an individual stack of dies define shape DieStack union { translate <0, 0, 1.5> { scale 3 { shape Die } } translate <0, 0, 4> { rotate 45, <0, 0, 1> { scale 2 { shape Die } } } translate <0, 0, 5.5> { rotate 90, <0, 1, 0> { shape Die } } } # Instantiate various DieStack objects translate <-5, 0, 0> { shape DieStack } translate <5, 0, 0> { rotate 90, <0, 0, 1> { shape DieStack } } translate <0, 5, 0> { rotate 180, <0, 0, 1> { shape DieStack } } translate <0, -5, 0> { rotate 270, <0, 0, 1> { shape DieStack } } }