// Maneração de Dados // Daniel Kalil Franulovic ra 001525 // ====================================================================== // CÂMERA global_settings { assumed_gamma 1.5 } camera { location < 60, 5.00, 30.00 > // Posição do observador. right <-0.60,0.00,0.00> // right -1.0*x // Largura RELATIVA da imagem. // up 0.75*y // Altura RELATIVA da imagem. up <0.00,0.00,0.80> sky <0.00,0.00,1.00> // Qual direção é "para cima"? look_at < 10, 5.00, 0.50 > // Para onde a câmera está apontando. } // Nota: os parâmetros "right" e "up" devem ter a mesma proporção // que os parâmetros ${WIDTH} e ${HEIGHT} no Makefile. // ====================================================================== // FONTES DE LUZ light_source { < +10.0, +10.0, +70.0 > // Posição da lâmpada. color rgb 2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < +10.0, 15.0, +100.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < +10.0, -70.0, 100.0 > // Posição da lâmpada. color rgb 2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < +0.0, -50.0, 0.1 > // Posição da lâmpada. color rgb 2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < 0, 10.0, 1 > // 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.95 > } #declare fonte = seed(464134659); #include "colors.inc" #include "stoneold.inc" #include "skies.inc" #declare tinta_marrom = texture { pigment { color rgb < 0.3, 0.2, 0.05 > } finish { diffuse 0.5 specular 0.4 roughness 0.005 ambient 0.1 } } #declare tinta_corpo = texture { pigment { color rgb < 0.3, 0.2, 0.05 > } finish { diffuse 0.5 specular 0.4 roughness 0.005 ambient 0.1 } } #declare mao = prism { linear_sweep linear_spline 0, // sweep the following shape from here ... 0.7, // ... up through here 5, // the number of points making up the shape ... <-0.6,-0.2>, <0.1,-0.15>, <0.1,0.15>, <-0.6,0.2>, <-0.6, -0.2> texture { tinta_marrom } } #declare garra = prism { linear_sweep linear_spline 0, // sweep the following shape from here ... 0.2, // ... up through here 5, // the number of points making up the shape ... <-1.2,0>, <-0.6,0.15>, <-0.6,0.2>, <-0.9,0.1>, <-1.2, 0> texture { tinta_marrom } } #declare pata = object {union{ object{mao} object{garra} object{garra translate<0,0.5,0>} } translate <0,-0.35,0> scale <1,1,-1> } #declare articulacao = cylinder{ <0,-0.4,0>, <0,0.4,0>, 0.4 texture {tinta_marrom} } #declare braco1 = cylinder{ <0,0,0>, <0,0,3>, 0.4 texture {tinta_marrom} } #declare braco2 = cylinder{ <0,0,0>, <0,0,3.5>, 0.4 texture {tinta_marrom} } #declare braco3 = cylinder{ <0,0,0>, <0,0,5>, 0.4 texture {tinta_marrom} } #declare braco1pata = union { object {pata scale 1.3 rotate <0,105,0> translate <0,0,3>} object {articulacao translate <0,0,3>} object {braco1} } #declare perna1 = union { object {braco1pata rotate <0,15,0> translate <0,0,3.5>} object {articulacao translate <0,0,3.5>} object {braco2} } #declare perna = union { object {perna1 rotate <0,45,0> translate <0,0,5>} object {articulacao translate <0,0,5>} object {braco3} } #declare cabeca = object { sphere { <0,0,0>,4 texture {tinta_corpo} } translate <-7.5,-15,0> } #declare corpo = object{ difference { object {sphere {<0,0,0>,10 texture {tinta_corpo} scale <1,3,0.6>}} object {box {<-100,-100,0>,<100,100,100> texture {tinta_corpo}} } } translate <-7.5,15,0> } #declare i = 0; #if (clock < 0.25) #declare alfa = 60 + 120*clock; #end #if ((clock > 0.25)&(clock<0.5)) #declare alfa = 90 - 120*(clock-0.25); #end #if (clock > 0.5) #declare alfa = 60; #declare beta = 30 - 120*(clock-0.5); #declare gama = -30 + 120*(clock-0.5); #end #if (clock < 0.5) #declare delta = 60; #declare beta = -30 + 120*clock; #declare gama = 30 - 120*clock; #end #if ((clock > 0.5)&(clock<0.75)) #declare delta = 60 + 120*(clock-0.5); #end #if (clock > 0.75) #declare delta = 90 - 120*(clock-0.75); #end #declare pernas = union { #while (i<3) object{ union { object { union { object { union { object {pata scale 1.3 rotate <0,105,0> translate <0,0,3>} object {articulacao translate <0,0,3>} object {braco1} } rotate <0,15,0> translate <0,0,3.5>} object {articulacao translate <0,0,3.5>} object {braco2} } rotate <0,45 -(alfa-60)/2,0> translate <0,0,5>} object {articulacao translate <0,0,5>} object {braco3} object {articulacao} } #if (i = 1) rotate <0,-alfa,beta> scale<-1.5,1.5,1.5> translate<0,15*i,0>} #else rotate <0,-alfa,beta> scale 1.5 translate<-15,15*i,0>} #end object{ union { object { union { object { union { object {pata scale 1.3 rotate <0,105,0> translate <0,0,3>} object {articulacao translate <0,0,3>} object {braco1} } rotate <0,15,0> translate <0,0,3.5>} object {articulacao translate <0,0,3.5>} object {braco2} } rotate <0,45 - (delta-60)/2,0> translate <0,0,5>} object {articulacao translate <0,0,5>} object {braco3} object {articulacao} } #if (i = 1) rotate <0,-delta,gama> scale 1.5 translate<-15,15*i,0>} //scale 1.5 pq a perna estava muito pequena #else rotate <0,-delta,gama> scale<-1.5,1.5,1.5> translate<0,15*i,0>} #end #declare i = i + 1; #end } #declare chao = plane { z,-2 texture {Grnt15} } #declare teste = object {perna rotate <0,0,90> translate <0,0,10>scale 2 } #declare inseto = object{ union { object {pernas} object {corpo} object {cabeca} } rotate <0,180,0> translate <0,0,11.5> scale <0.5,0.5,0.5> } sky_sphere{ S_Cloud5} //pq tah de lado??? inseto chao