// MC930A Setima Atividade de Laboratório utilizando POV-ray // Autor: Mário Riudoms Sangenis - RA: 992198 // Last edited on 2003-05-29 02:18:53 by stolfi #include "colors.inc" #include "textures.inc" background{ color rgb < 1.00, 1.00, 1.00 > } camera { location 0.85*< 12+10*clock, 0.00, -2.00 > right x // was 1.2*x up y // was 0.9*z sky y look_at < 0.00, 0.00, 0.00 > } light_source { 10*< 10.00, 7.00, -10.00 > color rgb 0.7*< 1.00, 1.00, 1.00 > } light_source { 10*< 15.00, 18.00, 10.00 > color rgb 0.6*< 1.00, 1.00, 1.00 > } light_source { 10*< 10.00, 5.00, -7.00 > color rgb 1.0*< 1.00, 1.00, 1.00 > } plane { y,-4.1 pigment{ checker color rgb <1,1,1> color rgb <0.5,0.7,1.0> } } #if (clock < 0.25) #declare perna_rot = 45*(clock*4); #declare anteperna_rot = -30*(clock*4); #else #declare perna_rot = 45*(1.25-clock*5/4); #declare anteperna_rot = -30*(1.25-clock*5/4); #end #if (clock < 0.5) #declare altura = -clock; #else #declare altura = clock-1; #end #declare pe = union { cylinder{<0.00, -0.80, 0.00>, <0.00, -1.00, 0.00>, 0.10 pigment{Red}} box{<-0.40, -1.20, 0.50>, <0.40, -1.00, -0.50> pigment{Red}} } #declare anteperna = union { cylinder{<0.00, 0.00, 0.00>, <0.00, -0.80, 0.00>, 0.23 pigment{Green}} object { pe } } #declare perna = union { cylinder{<0.00, 0.00, 0.00>, <0.00, -1.10, 0.00>, 0.25 pigment{Green}} sphere{<0.00, -1.30, 0.00>, 0.3 pigment{Red}} object { anteperna rotate translate <0.0,-1.50,0.0>} } #declare corpo = cylinder { < 0.00, 1.50, 0.00 >, < 0.00, -1.50, 0.00 >, 1.00 pigment { Blue } } #declare braco = union { sphere{<1.20, 1.00, 0.00>, 0.3 pigment{Red}} cylinder{<1.30, 1.00, 0.00>, <2.30, 0.00, 0.00>, 0.22 pigment{Green}} sphere{<2.20, 0.00, 0.00>, 0.3 pigment{Red}} cylinder{<2.30, 0.00, 0.00>, <1.60, -1.20, 0.00>, 0.2 pigment{Green}} cylinder{<1.60, -1.20, 0.00>, <1.40, -1.54, 0.00>, 0.08 pigment{Black}} cylinder{<1.40, -1.50, 0.00>, <1.20, -1.35, 0.00>, 0.08 pigment{Black}} } #declare cabeca = union { cylinder{<0.00, 1.50, 0.00>, <0.00, 2.00, 0.00>, 0.30 pigment{Magenta}} sphere{<0.00, 1.80, 0.00>, 0.7 pigment{Yellow} scale <1,1.5,1>} sphere{<0.00, 2.15, -0.40>, 0.5 pigment{Brown} scale <1.2,1,1>} } #declare cabeca_boca = difference { object { cabeca } cylinder{<2.00, 1.90, -0.90>, <-2.00, 1.90, -0.90>, 0.15} } #declare olho = union { sphere{<-0.25, 2.10, -0.5>, 0.18 pigment{Cyan} scale <1,1.4,1>} } #declare plano = plane { y, -10.0 pigment {checker color Black, color White } } #declare robo = union { object { corpo } object { braco } object { braco scale <-1,1,1>} object { cabeca_boca } object { olho } object { olho scale <-1,1,1>} object { perna rotate translate <0.5,-0.95,0.0>} object { perna rotate <-perna_rot,0,0> translate <-0.5,-0.95,0.0>} } // Aqui está a cena, finalmente: union { //object { plano } object { robo translate <10*clock,altura,0>} }