// ====================================================================== // 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_plastico2 = texture{ pigment{ color rgb < 0.10, 0.80, 1.50 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_plastico3 = texture{ pigment{ color rgb < 0.10, 0.80, 2.50 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } // ====================================================================== // DESCRIÇÃO DA CENA #declare cabecaCorpo = union{ sphere {<0,0,7.5> 1.0 texture{tx_plastico}} //cabeca cylinder{<0,0,6>,<0,0,7>, 0.3 texture{tx_plastico}} //pescoco cylinder{<0,0,0>,<0,0,6>, 1.2 texture{tx_plastico}} //tronco } #declare antebracoMao = union{ cylinder {<0,0,0>,<0,0,-3>, 0.5 texture{tx_plastico}} //braco sphere {<0,0,-5>,1.0 texture{tx_plastico}} //mao } #declare braco = cylinder {<0,0,0>,<0,0,-2.0>, 0.5 texture{tx_plastico}} #declare coxa = cylinder {<0,0,-4>,<0,0,0>, 0.5 texture{tx_plastico}} #declare canela = cylinder {<0,0,-3>,<0,0,0>,0.5 texture{tx_plastico}} #declare pe = box{ <0,0,0>, <1,1,1> texture{tx_plastico}} //----------------------------------------------- #macro Mao () object{antebracoMao} #end #macro chamaBraco (rotMao) union{ object{Mao rotate <0,rotMao,0> translate <0,0,-2>} object{braco} } #end #macro chamaPe() object{pe} #end #macro chamaCanela(rotPe) union{ object{chamaPe() rotate <0,rotPe,0> translate <0,0,-3>} object{canela} } #end #macro chamaCoxa(rotPe,rotCanela) union{ object {chamaCanela (rotPe) rotate <0,rotCanela,0> translate <0,0,-4>} object {coxa} } #end #macro boneco (rotPeE, rotCanelaE, rotCoxaE, rotBracoE, rotMaoE, rotPeD, rotCanelaD, rotCoxaD, rotBracoD, rotMaoD ) union{ object{cabecaCorpo} object{chamaCoxa (rotPeE, rotCanelaE) rotate<0,rotCoxaE,0>} object{chamaCoxa (rotPeD, rotCanelaD) rotate <0,rotCoxaD,0>} object{chamaBraco (rotMaoE) rotate <0,rotBracoE,0>} object{chamaBraco (rotMaoD) rotate <0,rotBracoD,0>} } #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } object{chamaCoxa(0,45)} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 20.0; #declare dir_camera = < 10.00, 30.00, 20.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)