// CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_grey = texture{ pigment{ color rgb < 0.6, 0.6, 0.7 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } // ====================================================================== // DESCRICAO DA CENA #declare camara = box{<1, 1, 1> , <-1, -1, -1> texture{ tx_grey }} #declare tunel = cylinder{<1, 0, 0> , <-1, 0, 0>, 0.35 texture{ tx_fosca }} #macro gerar_mina(n, m) union{ #declare dados_camara = array[n]; #declare seed1 = seed(2); #declare i = 0; #while(i < n) // gera camera #declare centro_x = 60*rand(seed1)-30; #declare centro_y = 60*rand(seed1)-30; #declare centro_z = 60*rand(seed1)-30; #declare raio = 1+3*rand(seed1); box{ , texture{tx_grey} } // guarda centro e raio da camara gerada #declare dados_camara[i] = ; #declare i = i+1; #end #declare i = 0; #while(i < m) #declare camara1 = int(n*rand(seed1)); #declare camara2 = int(n*rand(seed1)); #while(camara1 = camara2) #declare camara2 = int(n*rand(seed1)); #end #declare raio = 0.3+rand(seed1); cylinder{ , , raio texture{ tx_fosca }} #declare i = i+1; #end } #end // CONSTRUCAO DA CENA object{ gerar_mina(30, 20)} // camera and light: #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 60; #declare dir_camera = < 0.00, 2.00, 4.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)