#include "colors.inc" #declare gama=10; #declare beta=60; #declare alfa=120; #declare c=20; #declare fonte=seed(456231); background{ color rgb < 0.95, .85, .50 > } light_source { < 0.00, 30.00, 30.00 > color rgb < 1.00, 1.00, 1.00 > } camera { // location < 0.00, 0.00, 50.00 > //de cima location < -5.00, 13.00, 7.00 > // location < 0.00, 16.00, 0.00 > //de frente // location < 16.00, 0.00, 0.00 > // de lado right < 1.00, 0.00, 0.00 > up < 0.00, 0.00, 1.00 > // right < 0.60, 0.00, 0.00 > // up < 0.00, 0.00, 0.80 > sky < 0.00, 0.00, 1.00 > look_at < 0.00, 0.00, 0.00 > } //TEXTURAS E CORES #declare tx_espelho = texture{ pigment { rgb <1,1,1> } finish { ambient 0.05 diffuse 0.05 reflection Gray specular 0.30 roughness 0.05 } } //EIXOS #declare eixoX = cylinder{ <3, 0, 0 > <-3, 0 ,0 > 0.1 texture { pigment { color Red filter 1}} } #declare eixoY = cylinder{ <0, 3, 0 > <0, -3 ,0 > 0.1 texture { pigment { color Blue filter 1} } } //OBJETOS #declare junta= sphere{ <0,0,0>,.2 texture{pigment{color Green}} } #declare garra= cone { <0,0,0>, .2 // Center and radius of one end <0,0,-1>, 0 // Center and radius of other end } #declare patas= union{ #declare i=0; #while(i<8) //angulos #if(mod(i,2)=0) #declare alfa=(10*sin(2*pi*3*(clock)+pi/4)+30); #declare alfa2=(9*sin(2*pi*3*(clock))+5); #declare beta=(-30*sin(2*pi*3*(clock))+50); #else #declare alfa=(10*sin(2*pi*3*(clock)+pi+pi/4)+30); #declare alfa2=(9*sin(2*pi*3*(clock)+pi)+5); #declare beta=(-30*sin(2*pi*3*(clock)+pi)+50); #end #declare pe= union{ cylinder { <0,0,0> <-1,0,0> .2 texture{pigment{color Red}} } object{ junta translate <-1,0,0> } object{ garra rotate gama*-y translate <-1,0,0> } } #declare perna= union{ cylinder { <0,0,0> <-5,0,0> .2 texture{pigment{color Red}} } object{ junta translate <-5,0,0> } object{ pe rotate beta*y translate <-5,0,0> } } union{ cylinder { <0,0,0> <-3,0,0> .2 texture{pigment{color Red}} } object{ junta translate <-3,0,0> } object{ perna rotate 60*-y rotate alfa*-y //sobe translate <-3,0,0> } rotate c*y rotate alfa2*z //frente translate <0,-2,0> #if(i<4) translate <-3*.8,3,0> rotate 20*(i-2)*-z #else scale<-1,1,1> translate <3*.8,3,0> rotate 20*(i-6)*z #end } #declare i=i+1; #end } #declare corpo= sphere{ <0,0,0>, 3 scale<1,.8,.8> texture{pigment{color Red}} } #declare olho= object{ corpo scale <1,1,1>*.1 texture{pigment{color Black}} } #declare aranha= union{ object{ corpo } object{ corpo scale <1,1,1>*1.5 translate<0,-5,0> } object{ corpo scale <1,1,1>*.5 translate<0,3,0> } object{ olho translate<-.7,4,.7> } object{ olho translate<.7,4,.7> } object{ patas } } //CENA union{ object{ aranha scale<1,1,1>*.8 #declare to=(-9)*(1-clock)+clock*(9); translate <0,to,0> } //chao onde ela passa object { plane {z,0} translate <0,0,-4> pigment {checker color White, color Gray } } }