// Last edited on 2007-07-23 15:12:09 by stolfi // Processed by remove-cam-lights global_settings { max_trace_level 12 } #declare tinta_xadrez = texture { pigment { checker color rgb <0.40,0.50,0.60>, color rgb <0.90,0.95,1.00> } finish { ambient 0.6 diffuse 0.4 } } background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #declare tinta_rosto = 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_vermelha = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_amarela = texture { pigment { color rgb < 1.00, 1.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_rosto = texture { pigment { color rgb < 0.50, 0.50, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_metal = texture { pigment { color rgb < 0.50, 0.50, 0.50 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare palito = union{ cylinder{ <0.0,0.0,0.0>, <0.0,0.0,10.0>, 0.5 texture{tinta_amarela} } sphere{ <0.0,0.0,10.0> 1.0 texture{tinta_vermelha} } } #declare escudo = difference{ sphere{ <0.0,0.0,0.0> 5.0 scale <0.2,1,1> texture {tinta_amarela} } } #declare mao_palito = union{ box{ <-1.0,-1.0,0.0> <1.0,1.0,2.0> texture{tinta_rosto} } object{palito translate <0.0,0.0,-1.0>} } #declare mao_escudo = union{ box{ <-1.0,-1.0,0.0> <1.0,1.0,2.0> texture{tinta_rosto} } object{escudo translate <2.0,0.0,-1.0>} } #declare antebraco = union{ cylinder{ <0.0,0.0,0.0>, <0.0,0.0,6.0>, 1.0 texture{tinta_metal} } } #declare braco = union{ cylinder{ <0.0,0.0,0.0>, <0.0,0.0,5.0>, 1.0 texture{tinta_metal} } sphere{ <0.0,0.0,0.0> 1.2 texture{tinta_metal} } sphere{ <0.0,0.0,5.0> 1.2 texture{tinta_metal} } } #macro desenha_antebraco(angulo_mao ,escudo) union{ #if (escudo = 0 ) object{mao_palito rotate x*angulo_mao } #else object{mao_escudo rotate x*angulo_mao } #end object{antebraco} } #end #macro desenha_braco(angulo_antebraco,angulo_mao,escudo) union{ object{braco} object{ desenha_antebraco(angulo_mao,escudo) translate <0.0,0.0,-6.0> rotate x*angulo_antebraco } } #end #declare joelho_pe = union{ cylinder{ <0.0,0.0,-10.0> <0.0,0.0,0.0> 1.0 texture{tinta_metal} } sphere{ <0.0,0.0,0.0> 2.0 texture{tinta_rosto} scale <1.0, 1.0, 0.5> translate <0.0,0.0,-10.0> } sphere{ <0.0,0.0,0.0> 1.2 texture{tinta_metal} } } #macro perna(angulo_joelho) union{ cylinder{ <0.0,0.0,-7.0> <0.0,0.0,0.0> 1.0 texture{tinta_metal} } object{joelho_pe rotate y*angulo_joelho translate <0.0,0.0,-7> } } #end #declare corpo = union{ box{ <0.0,0.0,0.0> <5.0,5.0,5.0> translate <-2.5,-2.5,0> rotate y*45 translate <-2.0,0,2.5> texture{tinta_metal} } box{ <0.0,0.0,0.0> <6,5.0,5.0> translate <-3,-2.5,0> texture{tinta_metal} } box{ <0.0,0.0,0.0> <5.0,5.0,5.0> translate <-2.5,-2.5,0> rotate y*45 translate <-2.0,0,-2.0> texture{tinta_metal} } } #declare cabeca = union{ sphere{ <0.0,0.0,0.0> 3 texture{tinta_rosto} } sphere{ <0.0,0.0,0.0> 1.5 scale <0.2,1,1> translate <0.0,1.7,2.2> texture{tinta_rosto} } sphere{ <0.0,0.0,0.0> 1.5 scale <0.2,1,1> translate <0.0,-1.7,2.2> texture{tinta_rosto} } sphere{ <3.0,0,1> 0.5 } } #macro guerreiro(a_xbe,a_zbe, a_xbd, a_zbd, a_zpe, a_ype, a_zpd,a_ypd,a_cabeca) union{ object{corpo rotate z*90} object{cabeca rotate z*a_cabeca translate <0.5,0,9>} cone{ <0.0,0.0,-4> 3 <0.0,0.0,0> 2.5 texture{tinta_metal} } object{ desenha_braco(-45,90,0) rotate a_xbe*x rotate a_zbe*z translate <0,-4,0> } object{ desenha_braco(00,90,1) rotate a_xbd*x rotate a_zbd*z translate <0,4,0> } object{perna(40) rotate z*a_zpe rotate y*a_ype translate <0.0,-2.0,-4> } object{perna(45) rotate z*a_zpd rotate y*a_ypd translate <0.0,2.0,-4> } } #end guerreiro(-20,40,20,40,-10,-60,0,-30,45) // Original camera parameters: // #local cam_ctr = <0,0,0> // #local cam_vec = <50.00,0.00,2.00> // #local cam_sky = z #include "camlight.inc" camlight(<0,0,0>,<10,7,5>,48.0,z,1.0)