// ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.30, 0.70, 0.70 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 0.70, 0.70, 0.80 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_pedra = texture{ pigment { color rgb <0.4, 0.2, 0> } finish { diffuse 0.9 ambient 0.1 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 12.0 } // ====================================================================== // DESCRIÇÃO DA CENA #declare roleta = seed(47); #declare camara = union { cone {<0,-2.2,0>, 1, <0,-1.5,0>, 2} cylinder {<0,-1.5,0>, <0,1.5,0>, 2} cone {<0,1.5,0>, 2, <0,2.2,0>, 1} } #macro mina(N,M) #declare espaco = N*4; #declare centros = array[N] #declare i = 0; #while (i < N) #declare centros[i] = < espaco*(rand(roleta)-0.5), espaco*(rand(roleta)-0.5), espaco*(rand(roleta)-0.5)>; #declare i = i + 1; #end #declare i = 0; #while (i < N) #declare escala = 0.6+rand(roleta); object {camara translate centros[i] scale escala texture {tx_pedra}} #declare i = i + 1; #end #declare j = 0; #while (j < M) #declare i1 = int(N*rand(roleta)); #declare i2 = int(N*rand(roleta)); #while (i2 = i1 | vlength(centros[i1]-centros[i2]) > espaco/2) #declare i1 = int(N*rand(roleta)); #declare i2 = int(N*rand(roleta)); #end cylinder {centros[i1], centros[i2], 0.6 texture {tx_pedra}} #declare j = j + 1; #end #declare i = 0; #declare im = 0; #declare zm = centros[0].z; #while (i < N) #if (centros[i].z >= zm) #declare im = i; #declare zm = centros[i].z; #end #declare i = i + 1; #end // poco union { cylinder { centros[im], centros[im]+<0,0,espaco*0.3>, 1.5 texture {tx_pedra} } cylinder { centros[im]+<0,espaco*0.2,espaco*0.3>, centros[im]+<0,0,espaco*0.3>, 1.5 texture {tx_pedra} } } #end #declare NCAM = 50; #declare NTUN = 100; mina(NCAM,NTUN) #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = NCAM*6; #declare dir_camera = < -7.00, -14.00, 0.00 >; #declare dist_camera = 4*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)