// Fib Beads 2001 Terry Stiemsma "Yooper2K" // Just the essential parts to generate a union of Fib spheres for applying an image. // Using Alf Peake's Fibonacci generator // Fibonacci or Golden numbers. Make sun-flower head, pine-cones etc. // Phi is approx 1.618 // phi = Phi-1 = (sqrt(5)-1)/2 = 0.61803399 // radius = sqrt(count), theta = count*360*phi degrees // Use radius to modify other parameters such as seed size. #version 3.1; //#version unofficial MegaPov 0.7; global_settings { assumed_gamma 2.2 } #include "colors.inc" //#include "TS_Letters.inc" //---- Simple Cam and Light ------------------------------------------ camera{ location <0,0,-30> angle 40 look_at <0,0,0> } light_source { 0*x color rgb <1,1,1> translate <-40,40,-40> } //--- Create Union of Spheres ---------------------------------------- #declare phi= (sqrt(5)-1)/2; #declare Inc = phi*360; // First component's offset to avoid a messy center. #declare Offset=0.5; // May also prevent a div_by_zero error #declare MaxCount=4500;//2300;//1400;// adjust as needed ...along with sphere size & image scale #declare Count=0; object{ union{ // a union of all spheres #while (Count // sizes your image ... use in conjuntion with MaxCount translate <-1,-1,0>*7// positions your image left/right and up/down } finish { //You will want to vary this depending on the image colors specular 0.9 roughness 0.025 // this results in a pearl-like finish on the light spheres metallic 1.0 diffuse 0.6 ambient 0.7 brilliance 3 } } cylinder { 0.1*z, 0.3*z, 7.0 //pigmentless disk behind beads to block background }