// Bernard Hatt 6/10/06 // A red dice light_source { z*-9 color rgb 1.5 } // Spot macro // Spots occur in pairs, center spot is two at the same place // C is the vector to the center of the face // H is the offset added or subtraced for the pair of spots #macro S(C,H) union { sphere{H/2, 0.199} // to avoid coincident surface problem sphere{-H/2, 0.2} pigment{rgb 0.9} // almost white finish{phong 0.7} // shiny scale C/2 // make spots shallower // relies on povray fixing to translate C // move to } #end difference { superellipsoid {<0.2, 0.2>} // basic rounded cubea //4 (was a 6, but adding S(x,z) made the code too long :-( ) S(x,z+y) S(x,z-y) //2 S(-z,x+y) //1 S(-y,0) pigment{rgb x} finish{phong 0.8} rotate 32 // so we can see three sides translate z*4 // move relative to default camera }