// 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 = texture{ pigment{ color rgb < 0.50, 0.50, 0.60 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 0.80, 0.80, 0.85 > } finish{ diffuse 0.2 reflection 0.1*< 0.80, 0.80, 0.85 > ambient 0.1 } } #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_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.72, 0.20 >, color rgb < 0.2, 0.2, 0.20 > } finish{ diffuse 0.9 ambient 0.1 } scale 0.5 } #declare tx_biscoito = texture{ pigment{ color rgb < 0.50, 0.25, 0.05 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_basezinha= texture{ pigment{ color rgb < 0.70, 0.40, 0.40 > } finish{ diffuse 0.9 ambient 0.1 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare raio_mastro = 0.2; // Partes da cena: #declare chao = box{ <-15,-15,-1>, <+15,+15,0> } #declare mastro= union{ cylinder{ <0,0,0>, <0,0,6>, raio_mastro } cylinder{ <0,0,6-raio_mastro>, <0,3,6-raio_mastro>, raio_mastro } cylinder{ <0,3,6>,<0,3,3.5>, raio_mastro } cylinder{ <0,3,3.5>,<0,3,3.2>, 3*raio_mastro texture{tx_basezinha} } texture{tx_fosca} } #macro braco (Xi, Yi, Zi, tam, angulo) union{ cylinder{ <0,0,0>,<0,0,-tam>, raio_mastro rotate -angulo*x translate } cylinder{ <0,0,0>,<0,0,-tam>, raio_mastro rotate angulo*x translate } #local ts=tam*sin(radians(angulo)); #local tc=tam*cos(radians(angulo)); cylinder{ <0,0,0>,<0,0,-tam*2/3>, raio_mastro rotate (90-angulo)*x translate } cylinder{ <0,0,0>,<0,0,-tam*2/3>, raio_mastro rotate -(90-angulo)*x translate } texture{tx_fosca} } #end #declare biscoito= torus{ 0.5,0.25 texture{tx_biscoito}} #include "eixos.inc" // Aqui está a cena, finalmente: union{ //object{ eixos(5.00) } object{ chao texture{tx_espelho} } union{ object{ mastro } object{ braco(0,3,3.2,2,60.0) } object{ biscoito translate<0,3,0.75>} translate <0,-6,0> } union{ object{ mastro } object{ braco(0,3,3.2,2,50.0) } object{ biscoito translate<0,3,0.75>} } union{ object{ mastro } object{ braco(0,3,3.2,2,40.0) } object{ biscoito translate<0,3,0.75>} translate <0,6,0> } } #include "camlight.inc" #declare centro_cena = < 0.00, 2.00, 2.00 >; #declare raio_cena = 12.0; #declare dir_camera = < 7.00, 2.00, 2.00 >; #declare dist_camera = 26.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)