// 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.70, 0.70, 0.80 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_bota = texture{ pigment{ color rgb < 92, 51, 23 >/255 } 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_nariz = texture{ pigment{ color rgb < 0.9, 0.30, 0.4 > } 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 orelha = union{ cone{ <0,0,1.5>, 0.3 <0,0,0>, 0 } difference{ sphere{ <0,0,1.5>, 0.3 } box{ <-3,-3,0>,<3,3,1.5> } } } #declare olho = sphere{ <0,0,0>, 0.2 } #declare corpo= sphere{ <0,0,0>, 1.0 scale<1.2,1.2,1.5> } #macro boneco(b2e,b1e,b2d,b1d,p3e,p2e,p1e,p3d,p2d,p1d) union{ object{cabeca_corpo() translate<0,0,2.5>} object{braco(b1e) rotate (-90+b2e)*x translate<0,0.9,0.9>} object{braco(-b1d) rotate (90-b2d)*x translate<0,-0.9,0.9>} object{perna(p1e,p2e) rotate -p3e*y rotate 60*z translate<0,0.8,-0.9>} object{perna(p1d,p2d) rotate -p3d*y rotate -60*z translate<0,-0.8,-0.9>} translate <0,0,2.7> } #end #macro cabeca_corpo () union{ difference{ sphere{ <0,0,0>, 1 } object{olho translate <0.6,0.4,0.6>} object{olho translate <0.6,-0.4,0.6>} } object{orelha translate <0,0.4,0.6>} object{orelha translate <0,-0.4,0.6>} sphere{ <1.0,0,0.3>, 0.2 texture{tx_nariz} } object{ corpo translate <0,0,-2.5>} } #end #macro braco(b1) union{ cylinder{ <0,0,0>, <0,0,1.2>, 0.15 } sphere{ <0,0,1.2>, 0.2 } object{antebraco() rotate b1*x translate<0,0,1.2>} } #end #macro antebraco() union{ cylinder{ <0,0,0>, <0,0,1.5>, 0.15 } sphere{ <0,0,1.5>, 0.3 } } #end #macro perna(p1,p2) union{ cylinder{ <0,0,0>, <0,0,-0.8>, 0.15 } sphere{ <0,0,-0.8>, 0.2 } object{anteperna(p1) rotate p2*y translate<0,0,-0.8>} } #end #macro anteperna(p1) union{ cylinder{ <0,0,0>, <0,0,-1>, 0.15 } union{ cylinder{ <0,0,-0.7>,<0,0,-1>, 0.3 } object{pe() rotate p1*y translate<0,0,-1>} texture{tx_bota} } } #end #macro pe() sphere{ <0,0,0>, 0.3 scale<3,2,1> translate<0.9,0,0> } #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ //object{ eixos(5.00) } object{ chao texture{tx_espelho} } object {boneco(20,90,-20,40,105,70,40,30,30,0) texture{tx_fosca} translate<0,-4,0>} object {boneco(40,30,-10,120,30,30,0,120,20,40) texture{tx_fosca} translate<0,4,0>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 2.00 >; #declare raio_cena = 11.0; #declare dir_camera = < 10.00, 2.00, 4.50 >; #declare dist_camera = 26.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)