// Last edited on 2003-12-08 19:49:27 by stolfi #include "colors.inc" #include "stoneold.inc" #include "glass.inc" #include "metals.inc" #declare ctr = < 7.00, 4.00, 2.00 > + <4*clock, 0, 0>; #declare camDir = < 10.00, -26.00, 6.00 >; // sphere{ ctr, 1 texture{ pigment{ color rgb <1,0,1> } finish { ambient 0.6 diffuse 0.4 } } } camera { location ctr + 0.75*camDir right -1.00*x up 0.75*y sky z look_at ctr } light_source { 10 * < +50.0, -30.0, +50.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +50.0 > // Posição da lâmpada. color rgb 0.6 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < 40, -10, 50 > color rgb 0.6 * <1,1,1> } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < .6, 0.60, 1 > } #declare tinta_A = texture { pigment { color rgb < 0.10, 0.80, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 1.00, 0.80, 0.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_C = texture { pigment { color rgb < 0.80, 1.00, 0.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_D = texture { pigment { color rgb < 1.00, 0.80, 1.10 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare chao = plane{ z, -1 texture{ pigment{ checker color rgb <0.7,0.6,0.5>, color rgb <0.6,0.5,0.2> } finish{ diffuse 0.7 ambient 0.3 } scale 0.5*4 } } //===================================== #declare corpo = box { <0,0,0>, <10,6,1> texture { Grnt7 scale 5} // translate <0,0,4> } #declare pernas = union { #declare k = seed(123242); #declare j = 0; #declare altern = 1; #while (j<2) #declare i=0; #while (i<4) //#declare rdm1 = rand(k)*90; //#declare rdm2 = rand(k)*90; //#declare rdm3 = rand(k)*90; #declare art4 = union { box { <0,0,0>, <.5,.5,1> texture { Grnt7 } } sphere { <.25,.25,0> .4 texture {Grnt7} } } #declare art3 = union { box { <0,0,0>, <.5,.5,1.4> texture { Grnt7 } } sphere { <.25,.25,0> .4 texture {Grnt7} } } #declare art2 = union { box { <0,0,0>, <.5,.5,1.4> texture { Grnt7 } } sphere { <.25,.25,0> .4 texture {Grnt7} } } #declare art1 = union { box { <0,0,0>, <.5,.5,2.2> texture { Grnt7 } } sphere { <.25,.25,0> .4 texture {Grnt7} } } #if (j = 0) #declare def1=4; #declare def2=3; #declare def3=2; #declare def4=1; #end #if (j = 1) #declare def1=1; #declare def2=2; #declare def3=3; #declare def4=4; #end #declare perna3 = union { object {art4 rotate x*30 rotate x*(altern*15*sin(clock*6.24 - def1)) translate <0,0,1.3> } object {art3} } #declare perna2 = union { object {perna3 rotate x*30 rotate x*(altern*15*sin(clock*6.24 - def2)) translate <0,0,1.4> } object {art2} } #declare perna1 = union { object {perna2 rotate x*30 rotate x*(altern*15*sin(clock*6.24 - def3)) translate <0,0,2.2> } object {art1} rotate x*90 } object {perna1 rotate <30 + (altern*10*sin(clock*6.24 - def4)),0,180*j> translate } #declare i = i + 1; #declare altern = altern * -1; #end #declare j = j + 1; #end } //===================================== object {chao} //union { //object {perna1 // rotate z*180 // translate y*6} // //object {corpo} //rotate z*-90 //} #declare bicho = union{ object {corpo} object {pernas} } object {bicho rotate z*90 translate <9+(4*clock),0,4 + 0.2*(sin(clock*12.48 + 1.5))> }