// ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare tx_gato = texture{ pigment{ color rgb <0.4,0.4,0.4>} } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #declare cabeca = sphere{ <0,0,0>, 1 texture{ tx_gato }} #declare tronco = cone {<0,0,0>, 2, <0,0,4>, 1 texture{ tx_gato }} #declare orelha = cone {<0,0,0>, 0.3, <0,0,0.7>, 0 texture{ tx_gato }} #macro gato(bdir,besq,abdir,abesq) union{ object{cabeca translate <0,0,5>} object{orelha translate <0,+0.6,5.6>} object{orelha translate <0,-0.6,5.6>} object{tronco translate <0,0,0>} object{braco(abdir) rotate translate <0,+1,3.7> } object{braco(abesq) rotate scale<+1,-1,+1> translate <0,-1,3.7>} // object{perna() translate <0,+1,-0.1>} // object{perna() scale<+1,-1,+1> translate <0,-1,-0.1>} } #end #macro braco(alfa) #local ombro = sphere {<0,0,0>, 0.4 texture{ tx_gato }} #local brac = cylinder {<0,0,0>, <0,0,-1.7>, 0.4 texture{ tx_gato }} union{ object{ ombro } object{ brac translate <0,0,-0.1> } object{ antebraco() rotate <0,-alfa,0> translate <0,0,-1.9> } } #end #macro antebraco() #local cotovelo = sphere {<0,0,0>, 0.4 texture{ tx_gato }} #local antebrac = cylinder {<0,0,0>, <0,0,-2>, 0.4 texture{ tx_gato }} #local mao = sphere {<0,0,0> 0.5 texture{ tx_gato }} union{ object { cotovelo } object { antebrac translate <0,0,-0.1> } object { mao translate <0,0,-2.3> } } #end // #macro perna() // #local articoxa = sphere {<0,0,0>, 0.5 texture{ tx_gato }} // #local cox = cylinder {<0,0,0>, <0,0,-1.7>, 0.6 texture{ tx_gato }} // // union{ // object{ articoxa } // object{ cox translate <0,0,-0,2> } // object{ anteperna() translate <0,0,-1.9> } // } // #end // // #macro anteperna() // #end // #macro canela() // #end // #macro pe() // #end #include "eixos.inc" // Aqui está a cena, finalmente: union{ object{ eixos(3.00) } object{ chao translate < 0,0,-5 > texture{ tx_xadrez } } object{ gato(30,60,15,50) translate <0,4,0>} object{ gato(90,30,90,15) translate <0,-4,0>} } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 10.0; #declare dir_camera = < 4, 0, 2 >; #declare dist_camera = 10.0; #declare intens_luz = 1; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)