// DICE by FUXOFT, 09/01/2002 global_settings {assumed_gamma 1.0} global_settings { ambient_light 0} #include "colors.inc" #include "arrays.inc" camera { location <8.5,5,10> look_at <0,-5,0> } light_source { <-5,9,-9> color White*.5} light_source { <8.5,7,10> color White*.5} #declare R1 = seed(1); #macro Face_Dots (Dot_Array, rot) #local i = 0; #local to = dimension_size(Dot_Array,1) - 1; #if (to>0) merge { #else object { #end #while (i<=to) sphere { , 0.55 } #local i=i+1; #end pigment {White} finish {specular 0.5 roughness 0.1} scale .5 translate y*1.2 rotate rot } #end #macro Die(Pigment) difference { intersection { box { <-1,-1,-1>, <1,1,1> } sphere { <0,0,0>, 1.4 } pigment {Pigment} finish {diffuse 0.3 specular 0.5 roughness 0.1 } //normal {pigment_pattern{wrinkles colour_map {[0, rgb 0.4][1, rgb 0.4]}scale 2}2} } Face_Dots (array[6][2] {{1,1}, {0,1}, {-1,1}, {1,-1}, {0,-1}, {-1,-1}}, <0,0,0>) Face_Dots (array[1][2] {{0,0}}, <180,0,0>) Face_Dots (array[2][2] {{-1,-1}, {1,1}},<90,0,0>) Face_Dots (array[5][2] {{-1,-1}, {1,1}, {1,-1}, {-1,1}, {0,0}},<-90,0,0>) Face_Dots (array[3][2] {{-1,-1}, {0,0}, {1,1}},<0,0,-90>) Face_Dots (array[4][2] {{-1,-1}, {-1,1}, {1,-1}, {1,1}},<0,0,90>) } #end #macro Rot (Seed) Rand_Array_Item (array[4] {0,90,180,270}, Seed) #end #local Size=19; #local Spacing=2.1; #local i=-Size; #while (i<=Size) #local j=-Size; #while (j<=Size) object { Die (rgbt) rotate translate } #local j=j+1; #end #local i=i+1; #end