// 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_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_amarela = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_rosquinha = texture{ pigment{ color rgb < 0.566, 0.276, 0.076 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca_verde = texture{ pigment{ color rgb < 0.2, 0.8, 0.1 > } finish{ diffuse 1 ambient 1 } } #declare tx_xadrez = texture { pigment {checker color rgb <1,1,1>, color rgb <0,0,0>} finish { diffuse 0.9 ambient 0.1} scale 2.0 } #declare tx_xadrez_verde = texture{ pigment{ checker color rgb < 0.10, 0.62, 0.10 >, color rgb < 0.20, 0.97, 0.20 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare caixa = box{ <0,0,0>, < 10,15,5> texture{ tx_fosca_amarela } } #declare furo = box{ <1,1,1>, < 9,14,6> texture{ tx_xadrez} } #declare cesta = difference { object{ caixa } object{ furo } } #declare bola = sphere{ < 0,0,0 >, 3 texture{ tx_fosca_verde} } #declare haste = cylinder { < 0, 0, 0>, <0, 20, 0>, 2 texture{ tx_xadrez_verde} } #declare cestaHaste = union { object {cesta translate <-5,20,-2>} object {haste} } #declare cone1 = cone { <0, 0, 0>, 3.5, <0, 0, 3>, 1.5 texture{ tx_plastico} } #macro braco (angulox, anguloz) union { object{ cestaHaste rotate translate <0,22,0> } } #end #macro objeto(angulox, anguloz) union{ object{ braco (angulox,anguloz) } object{ bola translate <0, 21, 0>} object{ haste } } #end #declare rosquinha = torus {2, 0.5 texture { tx_rosquinha } } #include "eixos.inc" // Aqui está a cena, finalmente: union { object { objeto (0, 30) } object { objeto (-30, 40) translate <30, 0, 0>} object { objeto (45, -20) translate <60, 0, 0> } object { rosquinha translate <0, 20, 0> rotate <0, 0, 30> translate <0, 25, 12>} object { rosquinha translate <0, 20, 0> rotate <-30, 0, 40> translate <30, 30, 8>} object { rosquinha translate <0, 20, 0> rotate <45, 0, -20> translate <60, 25, 6>} } #include "camlight.inc" #declare centro_cena = < 30.00, 30.00, 0.00 >; #declare raio_cena = 80.0; #declare dir_camera = < 14.00, 7.00, 14.00 >; #declare dist_camera = 160.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)