// ====================================================================== // CORES E TEXTURAS background{ color rgb <0.75, 0.80, 0.85> } #declare tx_brown = texture{ pigment { color rgb <0.5, 0.3, 0> } finish { diffuse 0.2 ambient 0.2 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare s = seed(360); #macro robot( p1b1, p1b2, p1b3, p1b4, p2b1, p2b2, p2b3, p2b4, p3b1, p3b2, p3b3, p3b4, p4b1, p4b2, p4b3, p4b4, a1, a2, a3 ) union { box { <-2, -1.25, -0.4>, <2, 1.25, 0.4> } union { object { leg(p1b2, p1b3, p1b4) rotate scale 6 translate <1.75, -1, 0> } object { leg(p2b2, p2b3, p2b4) rotate scale 6 translate <1.75, 1, 0> } object { leg(p3b2, p3b3, p3b4) rotate scale 6 translate <-1.75, -1, 0> } object { leg(p4b2, p4b3, p4b4) rotate scale 6 translate <-1.75, 1, 0> } } object { neck(a2, a3) rotate <0, a1, 0> scale 3 translate <2, 0, 0> } texture { tx_brown } } #end #macro leg(b2, b3, b4) #local leg_base = cylinder { <0, 0, 0>, <0, 0, -0.25>, 0.04 } union { object { leg_base } object { shin(b3, b4) rotate <0, b2 - 90, 0> translate <0, 0, -0.25> } } #end #macro shin(b3, b4) #local shin_base = cylinder { <0, 0, 0>, <0, 0, -0.25>, 0.04 } union { object { shin_base } object { metatarsus(b4) rotate <0, 90 - b3, 0> translate <0, 0, -0.25> } } #end #macro metatarsus(b4) #local metatarsus_base = cylinder { <0, 0, 0>, <0, 0, -0.25>, 0.04 } union { object { metatarsus_base } object { paw() rotate <0, b4 - 90, 0> translate <0, 0, -0.25> } } #end #macro paw() box { <-0.01, -0.05, -0.025>, <0.19, 0.05, 0.025> } #end #macro neck(a2, a3) #local neck_base = cylinder { <0, 0, 0>, <0, 0, 0.75>, 0.10 } union { object { neck_base } object { metaneck(a3) rotate <0, 90 - a2, 0> translate <0, 0, 0.75> } } #end #macro metaneck(a3) #local metaneck_base = cylinder { <0, 0, 0>, <0, 0, 0.4>, 0.075 } union { object { metaneck_base } object { head() rotate <0, a3 - 90, 0> translate <0, 0, 0.4> } } #end #macro head() sphere { <0, 0, 0.25>, 0.25 } #end #include "eixos.inc" eixos(5) union { object { robot( -25, 20, 15, 60, 25, 20, 15, 30, -25, 45, 15, 90, 25, 20, 15, 50, 45, 60, 60 ) rotate <-180, 0, -30> } } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 8.0; #declare dir_camera = < 14.00, 7.00, 6.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)