// Last edited on 2003-12-07 13:56:04 by stolfi // ====================================================================== #declare ctr = < 0, -18, 18 >; #declare camDir = < 145, -10, 170 >; camera { location ctr + 0.85*camDir right -0.80*x up 0.60*y sky y look_at ctr } // ====================================================================== // FONTES DE LUZ light_source { 10* < +0.0, 50.0, +3.0 > // Posição da lâmpada. color rgb 2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < +0.0, -1.0, 400 > // Posição da lâmpada. color rgb 2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #declare source = seed(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 < 0.25, 0.15, 0.01 > } finish { diffuse 0.5 specular 0.1 roughness 0.5 ambient 0.1 } } #declare dist_entre_patas = 10; #declare largura = 20; #declare num_patas_por_carreira = 4; #declare num_carreiras = 2; #declare conj_patas= union{ #declare j=0; #while (j,0.5 <4, 0, 0>, 0.1 open texture {tinta_B}} #declare pata = union{ cone { <0, 0, 0 >,0.9 <15, 0, 0>, 0.5 texture {tinta_B}} sphere{<15,0,0>,0.5 texture {tinta_B}} object{ unha rotate -1*alfa*z translate<15,0,0> } } #declare antebraco = union{ cone { <0, 0, 0 >,1.5 <25, 0, 0>, 0.9 texture {tinta_B}} sphere{<25,0,0>,0.9 texture {tinta_B}} object{ pata rotate -1*beta*z translate<25,0,0> } } #declare braco = union{ cone { <0, 0, 0 >,2 <35, 0, 0>, 1.5 texture {tinta_B}} sphere{<35,0,0>,1.5 texture {tinta_B}} object{ antebraco rotate -1*gama*z translate<35,0,0> } } #declare pata_completa = union{ sphere{<0,0,0>,2 texture {tinta_B}} object{ braco rotate -1*delta_1*z rotate -1*delta_2*x rotate -1*delta_3*y } } // Fim das declaracoes do objeto hierarquico object{ pata_completa translate <(1-j)*largura,0,dist_entre_patas*i> #if(j=0) scale<1,1,1> #else scale<-1,1,1> #end} #declare i=i+1; #end #declare j=j+1; #end } #declare tronco= union{ object{ cylinder{<0,0,-10>,<0,0,dist_entre_patas*num_patas_por_carreira+10>,largura texture {tinta_B}} scale<1,0.4,1>} } #declare pescoco = cylinder{ <0,0,dist_entre_patas*num_patas_por_carreira+10>, <0,0+5,dist_entre_patas*num_patas_por_carreira+30>,2 texture{tinta_B}} #declare cabeca= union{ object{ sphere{<0,0+5,dist_entre_patas*num_patas_por_carreira+30>,6 texture{tinta_B}} scale <0.8,1,1> translate <0,-5,-dist_entre_patas*num_patas_por_carreira-30> rotate 20*x translate <0,0+5,dist_entre_patas*num_patas_por_carreira+30> } } conj_patas tronco pescoco cabeca