#include "retalho.inc" // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.5, 0.5, 0.5 > } #declare branco = texture{ pigment{ color rgb < 1 1 1 > } finish{ diffuse 0.5 ambient 0.5 reflection 0.25} } #declare preto = texture{ pigment{ color rgb < 0 0 0 > } finish{ diffuse 0.5 ambient 0.5 reflection 0.25} } #declare vermelho= texture{ pigment{ color rgb < 0.9 0.1 0.1 > } finish{ diffuse 0.3 ambient 0.3 reflection 0.25} } #declare azul= texture{ pigment{ color rgb < 0.1 0.1 0.9 > } finish{ diffuse 0.5 ambient 0.5 reflection 0.25} } #declare verde= texture{ pigment{ color rgb < 0.1 0.9 0.1 > } finish{ diffuse 0.5 ambient 0.5 reflection 0.25} } #declare roxo= texture{ pigment{ color rgb < 0.9 0.1 0.9 > } finish{ diffuse 0.5 ambient 0.5 reflection 0.25} } // ====================================================================== // DESCRI��O DA CENA #include "eixos.inc" #macro encosto_esq() #local P1= array[4] {<4,4,6>,<4,2,6>,<2,0,6>,<0,0,6>}; #local P2= array[4] {<4,4,4>,<4,2,4>,<2,0,4>,<0,0,4>}; #local P3= array[4] {<4,4,2>,<4,2,2>,<2,0,2>,<0,0,2>}; #local P4= array[4] {<4,6,0>,<4,4,0>,<2,2,0>,<0,2,0>}; #local P= array[4] {P1,P2,P3,P4}; object{retalho(P,0.05,branco,vermelho,0,0,1,1)} #end #macro encosto_dir() #local P1= array[4] {<-4,4,6>,<-4,2,6>,<-2,0,6>,<0,0,6>}; #local P2= array[4] {<-4,4,4>,<-4,2,4>,<-2,0,4>,<0,0,4>}; #local P3= array[4] {<-4,4,2>,<-4,2,2>,<-2,0,2>,<0,0,2>}; #local P4= array[4] {<-4,6,0>,<-4,4,0>,<-2,2,0>,<0,2,0>}; #local P= array[4] {P1,P2,P3,P4}; object{retalho(P,0.05,branco,vermelho,0,0,1,1)} #end #macro assento_esq() #local P1= array[4] {<4,6,0>,<4,4,0>,<2,2,0>,<0,2,0>}; #local P2= array[4] {<4,8,-2>,<4,6,-2>,<2,4,-2>,<0,4,-2>}; #local P3= array[4] {<4,10,-2>,<4,8,-2>,<2,6,-2>,<0,6,-2>}; #local P4= array[4] {<4,12,0>,<4,12,0>,<2,12,0>,<0,12,0>}; #local P= array[4] {P1,P2,P3,P4}; object{retalho(P,0.05,branco,azul,0,0,1,1)} #end #macro assento_esq() #local P1= array[4] {<4,6,0>,<4,4,0>,<2,2,0>,<0,2,0>}; #local P2= array[4] {<4,8,-2>,<4,6,-2>,<2,4,-2>,<0,4,-2>}; #local P3= array[4] {<4,10,-2>,<4,8,-2>,<2,6,-2>,<0,6,-2>}; #local P4= array[4] {<4,12,0>,<4,12,0>,<2,12,0>,<0,12,0>}; #local P= array[4] {P1,P2,P3,P4}; object{retalho(P,0.05,branco,azul,0,0,1,1)} #end #macro assento_dir() #local P1= array[4] {<-4,6,0>,<-4,4,0>,<-2,2,0>,<0,2,0>}; #local P2= array[4] {<-4,8,-2>,<-4,6,-2>,<-2,4,-2>,<0,4,-2>}; #local P3= array[4] {<-4,10,-2>,<-4,8,-2>,<-2,6,-2>,<0,6,-2>}; #local P4= array[4] {<-4,12,0>,<-4,12,0>,<-2,12,0>,<0,12,0>}; #local P= array[4] {P1,P2,P3,P4}; object{retalho(P,0.05,branco,azul,0,0,1,1)} #end #macro apoio_pe_esq() #local P1= array[4] {<4,12,0>,<4,12,0>,<2,12,0>,<0,12,0>}; #local P2= array[4] {<4,14,2>,<4,14,2>,<2,14,2>,<0,14,2>}; #local P3= array[4] {<4,16,-4>,<4,16,-4>,<2,16,-4>,<0,16,-4>}; #local P4= array[4] {<4,18,-2>,<4,18,-2>,<2,18,-2>,<0,18,-2>}; #local P= array[4] {P1,P2,P3,P4}; object{retalho(P,0.05,branco,roxo,0,0,1,1)} #end #macro apoio_pe_dir() #local P1= array[4] {<-4,12,0>,<-4,12,0>,<-2,12,0>,<0,12,0>}; #local P2= array[4] {<-4,14,2>,<-4,14,2>,<-2,14,2>,<0,14,2>}; #local P3= array[4] {<-4,16,-4>,<-4,16,-4>,<-2,16,-4>,<0,16,-4>}; #local P4= array[4] {<-4,18,-2>,<-4,18,-2>,<-2,18,-2>,<0,18,-2>}; #local P= array[4] {P1,P2,P3,P4}; object{retalho(P,0.05,branco,roxo,0,0,1,1)} #end //Aqui est� a cena, finalmente: encosto_esq() encosto_dir() assento_esq() assento_dir() apoio_pe_esq() apoio_pe_dir() #include "camlight.inc" #declare centro_cena = < 0 ,-10,-5>; #declare raio_cena = 15; #declare dir_camera = < 0,10,5>; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)