// Last edited on 2004-01-23 14:02:18 by stolfi #include "colors.inc" #include "stones.inc" #include "golds.inc" #include "textures.inc" #include "skies.inc" //#declare maxim=4; #declare maxim=3; // #declare ctr = <-5,25+clock*10,0>; #declare ctr = < 24*(maxim-1)/2-24, 24*(maxim-1)/2 + 6, 0 >; #declare camDir = (maxim-1)/2 * <20+clock*-30, 20-clock*10, -60>; camera { location ctr + 1.20*camDir right -1.00*x up 0.75*y sky y look_at ctr } light_source { 10* < 0, 65, -30 > color rgb 1.0 * < 1, 1, 1 > } light_source { 10* < 20, 85, 50 > color rgb 0.3 * < 1, 1, 1 > } light_source { ctr + < 3, 12, -18*(maxim-1)/2 > color rgb 0.8 * < 1, 1, 1 > } #declare cor_metal_fosco= color rgb <0.3,0.3,0.3>; #declare metal_fosco= texture{ pigment {rgb cor_metal_fosco} finish{ ambient 0.001 diffuse 0.5 reflection cor_metal_fosco specular 0.050 roughness 0.1 } } #declare tinta_D = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.1 ambient 0.1 } } #declare cor_vidro = color rgb <0.9,0.9,0.9>; #declare vidro= texture{ finish{ ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.01 } pigment { cor_vidro filter 1} } #declare tuboext= cylinder{ <0,0,0>, <0,20.5,0>, 1 texture{vidro} interior{ior 1.1} } #declare tuboint= cylinder{ <0,-1,0>, <0,21,0>, 0.9 texture{vidro} interior{ior 1.1} } #declare tubo= difference{ object{tuboext} object{tuboint} } #declare tuboext_orto= object{tuboext rotate z*90 translate<5,5,0> } #declare tubo_conectado= union{ object{tuboext} object{tuboext_orto} } #declare esfera= sphere{ <0,0,0>,2 texture{vidro} interior{ior 1.1} translate<0,5,0> } #declare noh= difference{ object{esfera} object{tubo_conectado} translate<0,-5,0> } #declare pacote= box{ <1,0,0.5> <-1,1,-0.5> } #macro gera_mov(fonte_p,signal1) #declare calc_clock=fator*23*rand(fonte_p)+signal1*fator_movimento*clock; #if (signal1>0) #if (calc_clock>23) #declare ortotrans=fator_movimento*clock; #declare zrot=90; #declare normaltrans=signal1*24.5; #else #declare normaltrans=calc_clock; #declare ortotrans=0; #declare zrot=0; #end #else #if (calc_clock<-23) #declare ortotrans=fator_movimento*clock; #declare zrot=90; #declare normaltrans=signal1*23.5; #else #declare normaltrans=calc_clock; #declare ortotrans=0; #declare zrot=0; #end #end #end /*while simples*/ #declare fonte1=seed(296632); #declare fonte2=seed(12312); #declare fonte3=seed(12123); #declare fonte4=seed(66654); #declare i=0; #declare fator=1; #declare fator_movimento=15; #while(i<=9) #if(i<=5) #declare fonte=fonte1; gera_mov(fonte,1) object{pacote texture{pigment {color rgb }} rotate zrot*z translate<0,29.5,0> translate } #declare fonte=fonte2; gera_mov(fonte,-1) object{pacote texture{pigment {color rgb }} rotate zrot*z rotate 90*z translate<-23.5,29.5,0> translate } #declare fonte=fonte4; gera_mov(fonte,1) object{pacote texture{pigment {color rgb }} rotate zrot*z translate<0,5.5,0> translate} #end #declare calc_clock=i*5-23;//+fator_movimento*clock; #if(calc_clock>23) #declare ortotrans=fator_movimento*clock; #declare zrot=90; #declare normaltrans=23; #else #declare normaltrans=calc_clock; #declare ortotrans=0; #declare zrot=0; #end #if(i<8) object{pacote texture{pigment {color rgb }} translate<0,24+29.5,0> translate } #end object{pacote texture{pigment {color rgb }} rotate 90*z translate<0.5,29.5,0> translate<0,normaltrans,0> } object{pacote texture{pigment {color rgb }} rotate 90*z translate<24.5,29.5,0> translate<0,normaltrans,0> } #declare i=i+1; #declare fator=fator*-1; #end /*while's aninhados, 2 malhas*/ #declare i=0; #while(i} #if(j!=maxim-1) object{tubo rotate 90*z translate<24*(j)-2,24*(i)+6,0>} #end #if(i!=maxim-1) object{tubo translate<24*(j-1),24*(i)+30-2-20,0>} #end #declare j=j+1; #end #declare i=i+1; #end #declare noh1= object{noh translate<0,12,0> rotate 90*y } sky_sphere{ S_Cloud1 } plane{y,0 texture{ T_Stone1 } }