// Last edited on 2003-12-09 02:57:09 by stolfi #include "colors.inc" #include "stones.inc" #include "finish.inc" // ====================================================================== #declare ctr = < 0.00, 0.00, 3.00 >; #declare camDir = < 0.00, 20.00, 5.00 >; camera { location ctr + 0.60*camDir right -1.00*x up 0.75*y sky z look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { 10 * < +50.0, +50.0, +50.0 > // Posição da lâmpada. color rgb 1.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare tinta_Verde = texture { pigment { color rgb < 0.00, 0.80, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare chao = plane { <0,0,1>, -2.0 texture { T_Stone25 scale 4 } } #declare corpo = union { cone { <0,0,0>,1.0 <0,0,3>,0.5 open } sphere { < 0.00, 0.00, 0.00 >, 1.00 } pigment { granite } scale <1.0,0.7,0.7> translate <0,0,3> } #declare mao = cone { <0,0,0>, 0.25 <0.5,0,0>, 0.15 texture { tinta_Verde } } #macro antes_mao(alfa) union { cylinder { <0,0,0>, <1,0,0> 0.15 texture { tinta_Verde } } object { mao rotate alfa*z translate <1,0,0> } } #end #macro quase_fim(alfa,beta) union { cylinder { <0,0,0>, <1,0,0> 0.15 texture { tinta_Verde } } object { antes_mao(alfa) rotate beta*z translate <1,0,0> } } #end #macro membro(alfa,beta,gama) union { cylinder { <0,0,0>, <1,0,0> 0.15 texture { tinta_Verde } } object { quase_fim(alfa,beta) rotate gama*y translate <1,0,0> } } #end #declare antena = union { cylinder { <0,0,0>, <0,0,1> 0.05 texture { tinta_Verde } translate <0.1,0,5.6> } sphere { <0,0,0>, 0.06 texture { tinta_Verde } translate <0.1,0,6.6> } } #declare olho = cylinder { <0,0,0>, <0,0.2,0> 0.25 pigment { checker color rgb <0,0,0>, color rgb <0.9,0.9,0.9> scale 0.15 } translate <-0.4,0.5,5.5> } #declare cabeca = union { sphere { <0,0,0>, 0.7 translate <0,0,5.2> texture { tinta_Verde } } object { olho } object { olho scale <-1,1,1> } object { antena } object { antena scale <-1,1,1> } } // Cena: union { object { chao } object { corpo } object { cabeca } #declare fonte = seed(501); #declare posicoes = array[6] #declare posicoes[0] = <0.5,0,4.5>; #declare posicoes[1] = <-0.5,0,4.5>; #declare posicoes[2] = <0.5,0,3.5>; #declare posicoes[3] = <-0.5,0,3.5>; #declare posicoes[4] = <0.5,0,2.5>; #declare posicoes[5] = <-0.5,0,2.5>; #declare conta = 0; #while (conta < 6) #declare alfa = 30*rand(fonte); #declare beta = 30*rand(fonte); #declare gama = 30*rand(fonte); object { membro(alfa,beta,gama) #if ((conta=1)|(conta=3)) scale <-1,1,1> #end #if (conta > 3) rotate 60*y #end rotate 45*rand(fonte) translate posicoes[conta] } #declare conta = conta + 1; #end }