// ====================================================================== // CORES E TEXTURAS #include "colors.inc" #include "eixos.inc" background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.85, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.35 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.92, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare tx_plastico = texture{ pigment{ color rgb < 0.90, 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 } } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare phi = (-1+sqrt(5))/2; #declare cor1 = tx_vidro; #declare cor2 = tx_vidro; #declare chao = box{ <-20,-20,-5>, <+20,+20,-5> texture {tx_xadrez}} #macro dodecaedro(d) intersection { plane { <0,phi,1>, d texture{cor1} } plane { <0,-phi,1>, d texture{cor1} } plane { <0,phi,-1>, d texture{cor1} } plane { <0,-phi,-1>, d texture{cor1} } plane { , d texture{cor1} } plane { <-phi,1,0>, d texture{cor1} } plane { , d texture{cor1} } plane { <-phi,-1,0>, d texture{cor1} } plane { <1,0,phi>, d texture{cor1} } plane { <1,0,-phi>, d texture{cor1} } plane { <-1,0,phi>, d texture{cor1} } plane { <-1,0,-phi>, d texture{cor1} } interior { ior 1.3} } #end #macro octaedro(d) intersection { plane { <1,1,1>, d texture{cor2} } plane { <1,1,-1>, d texture{cor2} } plane { <1,-1,-1>, d texture{cor2} } plane { <1,-1,1>, d texture{cor2} } plane { <-1,-1,-1>, d texture{cor2} } plane { <-1,1,-1>, d texture{cor2} } plane { <-1,-1,1>, d texture{cor2} } plane { <-1,1,1>, d texture{cor2} } interior { ior 1.3} } #end #macro cubo(d) intersection { plane { <-1,0,0>, d texture{cor1} } plane { <1,0,0>, d texture{cor1} } plane { <0,-1,0>, d texture{cor1} } plane { <0,1,0>, d texture{cor1} } plane { <0,0,-1>, d texture{cor1} } plane { <0,0,1>, d texture{cor1} } interior { ior 1.3} } #end #macro icosaedro(d) intersection{ object { dodecaedro (1.065*d) } object { octaedro(d) } } #end #macro cuboctaedro(d) intersection{ object { cubo(d) } object { octaedro(1.15*d) } } #end // // Aqui está a cena, finalmente: union{ object { chao } object { octaedro(2) translate <0,0,7> } object { dodecaedro(2) translate <-7,0,7>} object { icosaedro(2) translate <-2,0,0>} object { cubo(2) translate <7,0,7>} object { cuboctaedro(2) translate <5,0,0>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 17.0; #declare dir_camera = <0,1,0>; //< 14.00, 7.00, 4.00 >; #declare dist_camera = 50.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)