// Last edited on 2003-12-07 18:26:27 by stolfi #include "colors.inc" background{ color rgb < 0.0, 0.7, 0.85 > } light_source{<1500,2500,2500> color White} light_source{<-1500,2500,2500> color White} #declare ctr = < 0.00, 0.00, 0.00 >; #declare camDir = < 5.00, 10.00, 7.00 >; camera { location ctr + 0.65*camDir right 1.20*x up 0.90*y sky y look_at ctr } #declare A = 0; #declare B = 0; #declare C = 0; #declare D = 0; #declare inseto = union{ sphere { <0, 0, 0>, 0.5 scale <1,1,5> pigment { Green } } sphere { <0, 0, 2.5>, 0.5 pigment { DarkGreen } } } // a perna eh composta de 4 partes, saindo do tronco ate chegar no chao, respectivamente: p4, p3, p2, p1 // o que nao esta na p1 eh considerado o resto r1 #declare k1 = 1; #declare k2 = 1; #declare k3 = 1; #declare k4 = 1; #declare a1 = 30; #declare a2 = 10; #declare a3 = 10; #declare a4 = 10; #declare p1 = cylinder { <0, 0, 0>, , 0.1 pigment { Yellow } rotate a1 } #declare p2 = union { cylinder { <0, 0, 0>, , 0.1 pigment { White } } object {p1 translate } rotate a2 } #declare p3 = union { cylinder { <0, 0, 0>, , 0.1 pigment { Red } } object {p2 translate } rotate a3 } #declare p4 = union { cylinder { <0, 0, 0>, , 0.1 pigment { Violet } } object {p3 translate } rotate a4 } object {p4 translate <0,1,0>} #declare gerador = seed(1234567); #declare j = 0; #while (j <= 4) object {p4 translate <0 ,0 ,rand(gerador)*2.5> } object {p4 translate <0 ,0 ,rand(gerador)*-2.5> } #declare j = j + 1; #end #declare j = 0; #while (j <= 4) object {p4 translate <0 ,0 ,rand(gerador)*2.5> scale <-1, 1, 1> } object {p4 translate <0 ,0 ,rand(gerador)*-2.5> scale <-1, 1, 1> } #declare j = j + 1; #end object{inseto} plane { y, -10 pigment { checker color Blue color White } }