/* http://milov.nl/entry/2137 */ camera { location <0,16,-3> look_at <0,0,0> } light_source { <-10,15,10> color rgb 1 } plane { y, -.2 hollow on pigment { color rgb <.5, .8, 1> } } // change any of these three numbers to get // widely differing snowflake shapes: #declare r1 = seed(93); // random seed for x-path #declare r2 = seed(592); // random seed for y-path #declare r3 = seed(142622229); // random seed for radius of cylinders #declare cx = 0; #declare cz = 0; #declare cr = 0; #declare lastx = 0; #declare lastz = 0; #declare counter = 0; #while (counter < 100) #declare cx = cx + rand(r1) - .5; #declare cz = cz + rand(r2) - .5; #declare cr = rand(r3) * .25;; #declare cyl = cylinder { , , .05 + cr texture { normal { facets size 2 } // cool crystal-like effect pigment { color rgb <.9,.9,1> } finish { ambient .2 diffuse 0.6 brilliance 1.0 phong 0.5 metallic } } }; // six arms #declare arms = union { object { cyl } object { cyl rotate <0,60,0> } object { cyl rotate <0,120,0> } object { cyl rotate <0,180,0> } object { cyl rotate <0,240,0> } object { cyl rotate <0,300,0> } }; // mirror union { object { arms } object { arms scale <-1,1,1> } scale 1.15 translate <0,0,.9> rotate <0,20,0> } #declare lastx = cx; #declare lastz = cz; #declare counter = counter + 1; #end