// Casey Uhrig, 1998 // using (some code from): Hair '98.06 // By Tsutomu HIGO E-mail: nj2t-hg@asahi-net.or.jp #include "colors.inc" #include "textures.inc" camera { location <0,0,-50> look_at <0,0,0> right up y } //background { color LightSteelBlue } background { color White } //light_source {<50, 100, -50> color White} //light_source {<20, 30, -18> color White} light_source { <2000,2000,-2000> color White } light_source { <-2000,-2000,-2000> color White } //fog { color White distance 12000 } /* difference { sphere { <0,0,0>,10000 } sphere { <0,0,0>,9999 } texture { pigment { LightSteelBlue } } } */ #declare BrilliantGlass=texture { pigment { color rgbf <1,1,1,.9> } finish { ambient 0.5 diffuse 0.1 brilliance 10 reflection 0.1 refraction 0.9 ior 1.45 specular 0.8 roughness 0.0003 phong 1 phong_size 400 } } #declare GlossyWhite=texture { pigment { color White } finish { Glossy ambient .25 } } //#declare R1 = seed(Cn*20) #declare R1 = seed(250); #declare Entity = union { #local Loop = 0; #while(Loop < 300) union { #local Xr = 20;// + 30 * rand(0); #local Yr = 30;// + 30 * rand(0); #local Xp = 0; #local Yp = 0; #local Zp = 0; #local Ct = 0; #local rad = .01 + .1 * rand(R1); #while (Ct < 30) //+10*rand(0)) #local Xr = Xr + 10 * rand(R1); #local Yr = Yr + 10 * rand(R1); cylinder { <0,-0.05,0>,<0,1.05,0>, rad rotate translate rotate z*90 } #local Xp = Xp + sin(Xr*pi/180)*sin(Yr*pi/180); #local Yp = Yp + cos(Xr*pi/180); //#local Yp = Yp + .1; #local Zp = Zp + sin(Xr*pi/180)*cos(Yr*pi/180); #local Ct = Ct+1; #end sphere { <0,0,0>,.2 rotate translate rotate z*90 } /* torus { .05, Xp rotate rotate z*90 } */ rotate } #local Loop=Loop+1; #end // set 2 /* #declare Loop=0; #while(Loop<200) union { #declare Cn =0; #while (Cn < 1) #declare Xr =20+30*rand(0); #declare Yr =30+30*rand(0); #declare Xp =0; #declare Yp =0; #declare Zp =0; #declare Ct =0; #while (Ct < 10+10*rand(0)) #declare Xr =Xr+10*rand(R1); #declare Yr =Yr+10*rand(R1); cylinder {<0,-0.05,0>,<0,1.05,0>, 0.05 rotate translate rotate z*90 } #declare Xp =Xp+sin(Xr*pi/180)*sin(Yr*pi/180); #declare Yp =Yp+cos(Xr*pi/180); #declare Zp =Zp+sin(Xr*pi/180)*cos(Yr*pi/180); #declare Ct = Ct+1; #end sphere {<0,0,0>,.2 rotate translate rotate z*90 } #declare Cn = Cn+1; #end rotate } #declare Loop=Loop+1; #end */ sphere { <0,0,0>,2.5 } texture { Aluminum } //texture { GlossyWhite } } /* plane { y,-30 texture { GlossyWhite finish { ambient .4 } } } plane { y,3000 texture { GlossyWhite finish { ambient .4 } } } */ /* sky_sphere { pigment { /* gradient y color_map { [ 0.5 color LightSteelBlue ] [ 1.0 color White ] } scale 2 translate -1 */ color LightSteelBlue } } */ #declare Molecule = union { union { #local Ct =0; #while (Ct < 300) sphere { <0,0,0>,1.2 translate<7+rand(R1)*1.55,0,0> rotate } #local Ct = Ct+1; #end scale .6 translate<2,.75,0> texture { Aluminum } } union { #declare Ct =0; #while (Ct < 100) sphere { <0,0,0>,1.2 translate<7+rand(R1)*1.55,0,0> rotate } #declare Ct = Ct+1; #end scale .6 translate<2,.75,0> //texture { BrilliantGlass } //texture { GlossyWhite } texture { Aluminum pigment { color LightSteelBlue } } } } object { Molecule translate <10, 13, 0> } //object { Entity } object { Entity } //translate<-10,-13,0> }