/* TP 09 */ background{ color rgb <0,0,0 > } #declare Yellow = rgb<255, 255, 0>; #declare Black = rgb < 0.4, 0.4, 0.4 >; #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_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare esfera = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_fosca } } #declare pe = cylinder {<0,0,0>, <7,0,0>, 4} #declare canela = cylinder {<0,0,0>, <20,0,0>, 5} #declare coxa = cylinder {<0,0,0>, <30,0,0>, 8} #declare tronco = cylinder {<0,0,0>, <60,0,0>, 40} #declare articulacao = sphere {<0,0,0>, 3} /* ====================================================================== DESCRIÇÃO DA CENA */ #include "eixos.inc" object{ eixos(3.00) } #macro criaPe() union { object{pe} texture {tx_fosca} } #end #macro criaCanelaPe(a) union { object{canela} object {articulacao translate<23,0,0>} object{criaPe() rotate<0,a, 0> translate<26,0,0>} texture {tx_fosca} } #end #macro criaPerna(a,b) union { object{coxa} object {articulacao translate<33,0,0>} object{criaCanelaPe(a) rotate<0,b, 0> translate<36,0,0>} texture {tx_fosca} } #end #macro criaCorpo(a1,b1,c1, a2, b2, c2, a3, b3, c3) union { object{tronco} object {articulacao translate<63,0,0>} object{criaPerna(a1, b1) rotate<0,c1, 0> translate<66,0,0>} object {articulacao translate<63,27,0>} object{criaPerna(a2, b2) rotate<0,c2, 0> translate<66,27,0>} object {articulacao translate<63,-27,0>} object{criaPerna(a3, b3) rotate<0,c3, 0> translate<66,-27,0>} texture {tx_fosca} } #end criaCorpo(30, 45, 30, -30, 45, 15, 45, 45, -30) #include "camlight.inc" #declare centro_cena = < 60.00, 0.00, 0.00 >; #declare raio_cena = 140.0; #declare dir_camera = < 20.00, 10.00, 50.00 >; #declare dist_camera = 7*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)