// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_madeira = texture{ pigment{ color rgb < 139/255, 69/255, 19/255 > } finish{ diffuse 0.8 ambient 0.5 specular 0.5 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.12, 0.10 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #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 } } #include "math.inc" // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 10.000; #declare phi = (sqrt(5)+1)/2; #include "eixos.inc" #macro dodecaedro(dist) union{ intersection{ plane{<1,0,phi>,dist} plane{<-1,0,phi>,dist} plane{<1,0,-phi>,dist} plane{<-1,0,-phi>,dist} plane{,dist} plane{<-phi,1,0>,dist} plane{,dist} plane{<-phi,-1,0>,dist} plane{<0,phi,1>,dist} plane{<0,-phi,1>,dist} plane{<0,phi,-1>,dist} plane{<0,-phi,-1>,dist} } } #end #macro octaedro(dist) union{ intersection{ plane{<1,1,1>,dist} plane{<1,1,-1>,dist} plane{<1,-1,1>,dist} plane{<-1,1,1>,dist} plane{<1,-1,-1>,dist} plane{<-1,1,-1>,dist} plane{<-1,-1,1>,dist} plane{<-1,-1,-1>,dist} } } #end #macro cubo(dist) union{ intersection{ plane{<0,0,1>,dist} plane{<1,0,0>,dist} plane{<0,1,0>,dist} plane{<0,0,-1>,dist} plane{<0,-1,0>,dist} plane{<-1,0,0>,dist} } } #end #macro icosaedro(dode, octa) union{ intersection{ object{dodecaedro(dode) } object{octaedro(octa) } } } #end #macro cuboctaedro(cuboo, octa) union{ intersection{ object{cubo(cuboo) } object{octaedro(octa) } } } #end // Aqui está a cena, finalmente: union{ object{ cuboctaedro(1, 1.155) texture{tx_vidro} interior{ ior 1.5}} object{ icosaedro(1.08, 1) texture{tx_vidro} interior{ ior 1.5} translate<3,0,0>} object{ eixos(15.00)} object{ box{<-30,-30,0>, <30,30,-1>} translate <0,0,-5> texture{tx_xadrez}} } #include "camlight.inc" #declare centro_cena = < 2.00, 0.00, 0.00 >; #declare raio_cena = 7; #declare dir_camera = < 1.0, 2.00,2.00 >; #declare dist_camera = 7; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)