// Last edited on 2003-12-07 17:31:09 by stolfi #include "colors.inc" #declare fonte=seed(456231); background{ color rgb < 0.9, 1.0, 0.95 > } #declare ctr = < 0.00, 0.00, 0.00 >; #declare camDir = < -5.00, 18.00, 8.00 >; camera { location ctr + 1.00*camDir right -1.00*x up 0.75*y sky z look_at ctr } light_source { 10*< -5.00, 30.00, 30.00 > color rgb 1.2*< 1.00, 1.00, 1.00 > } light_source { 10*< -30.00, 20.00, 30.00 > color rgb 0.6*< 1.00, 1.00, 1.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 #declare gama=rand(fonte)*120; #declare beta=rand(fonte)*60; #declare alfa=90+rand(fonte)*60;//maximo angulo de 150 min=90 #declare c=30+rand(fonte)*30;//maximo de 60 min=30 #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 alfa*-y translate <-3,0,0> } rotate c*y 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}} } //CENA union{ object{ corpo } object{ corpo scale <1,1,1>*2 translate<0,-9,0> } object{ corpo scale <1,1,1>*.3 translate<0,3,0> } object{ patas } }