// CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } 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 1.0 } // ====================================================================== // DESCRIÇÃO DA CENA #declare NA = (sqrt(5) - 1)/2; #declare chao = box{ <-10,-10,-1>, <+10,+10,0> } #macro face(xx,yy,zz,d) plane{ , d texture{tx_vidro} interior{ ior 1.5} } #end // Partes da cena: #macro dodecaedro(tam) intersection{ face(+1,0,+NA,tam) face(-1,0,+NA,tam) face(+1,0,-NA,tam) face(-1,0,-NA,tam) face(+NA,+1,0,tam) face(-NA,+1,0,tam) face(+NA,-1,0,tam) face(-NA,-1,0,tam) face(0,+NA,+1,tam) face(0,-NA,+1,tam) face(0,+NA,-1,tam) face(0,-NA,-1,tam) }bounded_by{ sphere {<0,0,0>, 2} } #end /* #macro icosaedro1(tam) intersection{ face(+1,0,+NA,tam) face(-1,0,+NA,tam) face(+1,0,-NA,tam) face(-1,0,-NA,tam) face(+NA,+1,0,tam) face(-NA,+1,0,tam) face(+NA,-1,0,tam) face(-NA,-1,0,tam) face(0,+NA,+1,tam) face(0,-NA,+1,tam) face(0,+NA,-1,tam) face(0,-NA,-1,tam) face(+1,+1,+1,tam) face(+1,+1,-1,tam) face(+1,-1,+1,tam) face(+1,-1,-1,tam) face(-1,+1,+1,tam) face(-1,+1,-1,tam) face(-1,-1,+1,tam) face(-1,-1,-1,tam) }bounded_by{ sphere {<0,0,0>, 2} } #end */ #macro octaedro(tam) intersection{ face(+1,+1,+1,tam) face(+1,+1,-1,tam) face(+1,-1,+1,tam) face(+1,-1,-1,tam) face(-1,+1,+1,tam) face(-1,+1,-1,tam) face(-1,-1,+1,tam) face(-1,-1,-1,tam) }bounded_by{ sphere {<0,0,0>, 2} } #end #macro cubo(tam) intersection{ face(+1,0,0,tam) face(-1,0,0,tam) face(0,+1,0,tam) face(0,-1,0,tam) face(0,0,+1,tam) face(0,0,-1,tam) }bounded_by{ sphere {<0,0,0>, 2} } #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ dodecaedro(1.06) texture{tx_fosca} } object{ octaedro(1) } object{cubo(1) translate<0,5,0>} object{octaedro(1.06) translate<0,5,0>} object{ chao texture{tx_xadrez} translate<0,3,-3>} } #include "camlight.inc" #declare centro_cena = < 0.00, 3.00, 1.00 >; //#declare centro_cena = < 0.00, (1-clock)*14+clock*7, -4.00 >; //#declare raio_cena = (1-clock)*60+clock*30; #declare raio_cena = 8; //#declare dir_camera = < 21.00, (1-clock)*40+clock*0, 0.00 >; #declare dir_camera = < 2.00, 0.00, 1.00 >; //#declare dist_camera = (1-clock)*30+clock*10; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)