// CORES E TEXTURAS background{ color rgb < 0.2, 0.6, 0.8 > } #declare tx_grama = texture{ pigment{ color rgb < 0.14, 0.56, 0.14 >} finish{ diffuse 0.7 ambient 0.5 } } #declare tx_arvore = texture{ pigment{ color rgb < 0.64, 0.16, 0.16 > } finish{ diffuse 0.2 ambient 0.1 } } #declare tx_prata = texture{ pigment{ color rgb < 0.3, 0.3, 0.3 > } finish{ diffuse 0.2 reflection 0.6 brilliance 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02} } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.5, 0.44, 0.98 >, color rgb < 0.00, 0.86, 0.29 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } //MACROS #macro gato(a,b,c,d,e) union{ object{tronco} object{cabeca() translate <0,0,2.5> } object{braco(a,b) translate<0,0.5,1.2> } object{braco(a,b) translate<0,0.5,1.2> scale<1,-1,1> } object{perna(c,d,e) translate <0.4,1.5,-2.5> } object{perna(c,d,e) translate <0.4,1.5,-2.5> scale <1,-1,1> } } #end #macro cabeca() union{ object{head} object{cone_orelha rotate <-30,0,0> translate <0,0.25,0.35> } object{cone_orelha rotate <30,0,0> translate <0,-0.25,0.35> } } #end #macro pe(e) object{foot rotate translate <-0.25,0,-0.25> } #end #macro braco(a,b) union{ object{arm} object{antebraco(b) translate <0,1.5,0> } rotate } #end #macro antebraco(b) union{ object{ab} object{mao() translate <0,1,0> } rotate } #end #macro mao() object{hand} #end #macro perna(c,d,e) union{ object{leg} object{anteperna(d,e) translate <0,0,-1> } rotate } #end #macro anteperna(d,e) union{ object{al} object{pe(e) translate <0,2,-1> } rotate } #end // ====================================================================== // DESCRIÇÃO DA CENA #declare raio = 0.5; #declare origem = <0,0,0>; #declare head = sphere{origem, raio texture{tx_grama} } #declare cone_orelha = cone{origem, 0.5*raio, <0,0,0.2>, 0 texture{tx_grama} } #declare foot = box{origem, <0.5,1,0.25> texture{tx_arvore} } #declare hand = sphere{origem, 0.5*raio texture{tx_arvore} } #declare tronco = sphere{origem, 2*raio texture{tx_grama} scale <0,0,2> } #declare arm = cylinder{origem, <0,1.5,0>, 0.5*raio texture{tx_grama} } #declare leg = cylinder{origem, <0,0,2>, 0.8*raio texture{tx_grama} } #declare al = cylinder{origem, <0,0,1.5>, 0.7*raio texture{tx_grama} } #declare ab = cylinder{origem, <0,1,0>, 0.4*raio texture{tx_grama} } #include "eixos.inc" object{gato(30,30,30,30,30)} object{gato(60,60,60,60,60) translate <0,6,0> } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 10; #declare dir_camera = < 3,0,3 >; #declare dist_camera = 60; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)