// Last edited on 2003-04-12 07:37:46 by stolfi #include "colors.inc" #include "stones.inc" #include "textures.inc" #include "skies.inc" camera { location <120,80, 220> //right 1.8*x up 0.6*y look_at <120,80,0> } // background { color Black } //light_source {2.0*<0,0, 150> White } light_source {<0,500,500> White } sky_sphere { S_Cloud5 } plane { y, -10 texture { White_Wood } } #declare source = seed(10); #declare cor_cristal = White; #declare tex_cristal = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.5 specular 1 roughness 0.001 } pigment {color cor_cristal filter 1.0} } #declare cor_espelho = Grey; #declare MetalT = texture { finish { ambient 0.05 diffuse 0.9 reflection cor_espelho specular 0.20 roughness 0.05 } pigment {rgb cor_espelho} } #declare pacote = box { <0,0,0>, <5,5,5> } #declare node = sphere { < 0, 0, 0>, 10 texture { MetalT} } #declare arestax = difference { cylinder { <0,0,0>, <0,0,80>, 5 //pigment { color Yellow } texture{tex_cristal} } cylinder { <-1,0,0>, <-1,0,80>, 4.5 texture{tex_cristal } } } #declare arestay = object{arestax rotate z*-90} #declare prateleira = union{ #declare i=0; #while (i<4) #declare j=0; #while (j<5) object{node translate <240 -i*80, 160-j*40, 0>} #if (i>0) object{arestax rotate 90*y translate <240 -i*80, 160-j*40> } #end #if (j<3) object{arestay rotate 90*x translate <240 -i*80, 160-j*40> } #end #declare j=j+1; #end #declare i=i+1; #end } #declare pacotes = union{ #declare i=0; #while (i<12) #if ((rand(source)<0.2) & (j<4)) #declare i=i+1; #end #declare j=0; #while (j<5) #if ((rand(source)<0.2) & (j<4)) #declare j=j+1; #end object{pacote translate <215 -i*18, 158-j*40, 0> #declare num = rand(source); #if (num <0.1) pigment {color Red} #else #if ((num > 0.1) & (num < 0.5)) pigment {color Yellow} #else #if ((num > 0.5) & (num < 0.9)) pigment {color Green} #else #if ((num > 0.9)) pigment {color Blue} #end #end #end #end } #declare j=j+1; #end #declare i=i+1; #end #declare i=0; #while (i<10) #if ((rand(source)<0.2) & (j<4)) #declare i=i+1; #end #declare j=0; #while (j<5) #if ((rand(source)<0.2) & (j<4)) #declare j=j+1; #end object{pacote translate <237-j*80,135 -i*15, 0> #declare num = rand(source); #if (num <0.1) pigment {color Red} #else #if ((num > 0.1) & (num < 0.5)) pigment {color Yellow} #else #if ((num > 0.5) & (num < 0.9)) pigment {color Green} #else #if ((num > 0.9)) pigment {color Blue} #end #end #end #end } #declare j=j+1; #end #declare i=i+1; #end } union{ object{prateleira} object{pacotes} }