// José Renato Paulon ra 970904 // Last edited on 2003-05-29 01:12:33 by stolfi // Exercicio 7 #include "colors.inc" #include "textures.inc" #include "stones.inc" #include "finish.inc" #declare fastclock = clock*2; #declare fastclock2 = (clock)*2 -1; #declare temp=1 ; #declare ang_esq_1 = 5 ; #declare temp = 1; background{Black} #declare ctr = <15,15,0>; #declare dob = <5,0,-15>; camera { location ctr + 4*dob right x up y sky y look_at ctr } light_source {10*<30,30,30> color 1.2*White} light_source {10*<30,30,-30> color 1.2*White} light_source {10*<10,3,-10> color 0.5*White} sky_sphere{ pigment {Blue_Sky} } #declare tx_madeira = texture { pigment { DMFWood4 scale 4 } finish { Shiny } // pre-defined in finish.inc } plane { y, -6 texture {tx_madeira} } //Pe+perna #declare coxa1 = cylinder { <0,0,0>,<0,20,0> 5 pigment {Brown} } #declare perna1 = cylinder { <0,0,0>,<0,15,0>, 4 pigment {Yellow} } #declare pe1 = box { <0,0,-2>,<10,2,2> pigment {Red} } #if (clock <= 0.5) #declare ang_esq_1 = 20*fastclock; #end #if (clock >= 0.5) #declare ang_esq_1 = 20 - 20*fastclock2; #end #declare perna_pe = union { object{perna1 translate <0,-3,0>} object{pe1 rotate z*ang_esq_1 translate <0,-5,0>} } #declare coxa_perna_pe = union { object{coxa1 translate <0,10,0> } object{perna_pe translate <0,-12,0> rotate z*ang_esq_1*-5 translate <0, 12,0>} } object { coxa_perna_pe rotate z*ang_esq_1*5 translate <30*clock,1.5*ang_esq_1,0>}