//seed the random number generator. #local S=seed(1); //set up a function for random numbers (0.0 -> 1.0) #macro G() rand(S) #end //set up another random number function (-1.0 -> 1.0) #macro F() 2*G()-1 #end //start drawing boxes #local C=0; //start the count #while(C<8) box{ -1,1 //start with a nice symmetric box pigment {color rgbt 1} //make it transparent interior{ ior 1+F() //give it a random refractive index media{emission 2*} //make the inside glow a random color } hollow //make the box hollow so media works //distort the result and move it ... randomly matrix scale .1} //shrink things a bit so they fit in the camera's view #local C=C+1; //increment the count #end