//Simplified snowflake generator //By Lucas Garron light_source{<0,1,-9>rgb 3} //Lighting #macro b(n) //each of the six arms calls this once, n denoting rotation union{ #local h=seed(37); //Seed for randomness; called each time to give identical arms //(other values give different results; try 92, for example) #local c=0; //Loop counter #while(c<30) //Place 30 beams box{ -z/99,rand(h)*x/2+0.3*x+z/99 //Create a slightly random beam pigment{rgb 1} //Color it white rotate 90*rand(h) //Rotate it randomly; this originally rotated randomly in all 3 axes, but that's not necessary translate/3+2*z //Traslate randomly } #local c=c+1; //Increment counter #end //End loop rotate z*60*n+z*27 //Rotate the set of beams } #end b(0)//Unrotated beams b(1)//Rotated 60° b(2)//Rotated 120° b(3)//Rotated 180° b(4)//Rotated 240° b(5)//Rotated 300°