//ALUNO: Pedro Henrique Machado Martins camera{ location < 30.00, 30.00, 30.00 > // Posi��o do observador. right -1.2*x // Largura RELATIVA da imagem. up 0.9*y // Altura RELATIVA da imagem. sky z // Qual dire��o � "para cima"? look_at < -30, 25.00, 5.00 > // 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 * < +50.0, +30.0, +50.0 > // Posi��o da l�mpada. color rgb 1.0 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz. } light_source{ 10 * < +50.0, -10.0, +10.0 > // Posi��o da l�mpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e cor da luz. } // ====================================================================== // EIXOS DE COORDENADAS #macro eixo(ponta,cor,nome) union{ sphere{ <0,0,0>, 0.02 } cylinder{ <0,0,0>, 0.91*ponta, 0.02 } cone{ 0.90*ponta, 0.06, ponta, 0.00 } texture{ pigment{ color rgb cor } finish{ ambient 0.5 diffuse 0.5 } } } #end #macro eixos(tamanho) union{ object{ eixo( , <1.0,0.2,0.2>, "X") } object{ eixo( <0,tamanho,0>, <0.0,0.8,0.0>, "Y") } object{ eixo( <0,0,tamanho>, <0.3,0.3,1.0>, "Z") } } #end // ====================================================================== // CORES E TEXTURAS background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_quadro = texture { pigment {image_map {jpeg "imagem.jpg" } scale <1, 16, 12> } finish { diffuse 0.8 ambient 0.2 } } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 1.00, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.90, 0.70 > } finish{ diffuse 0.1 reflection 0.8*< 1.00, 0.90, 0.70 > ambient 0.1 } } #declare tx_furo = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > filter 0.70 } finish{ diffuse 0.01 ambient 0.02} } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_world = texture{ pigment{ color rgb < 1.0, 1.0, 1.0 > } finish{ diffuse 0.01 ambient 0.02} } // ====================================================================== // DESCRI��O DA CENA #declare raio = 2.000; // Partes da cena: /* #declare bolinha = sphere{ < 0,0,0 >, 0.60 } #declare bolota = sphere{ < 0,0,0 >, 1.50 } #declare bola_grande = sphere{ < 0.00, 0.00, 0.00 >, raio texture{ tx_plastico } */ #macro box_maker (xi, yi, zi) box{ < xi, yi, zi >, < 0.0, 0.0, 0.0> texture { tx_plastico } } #end #macro wall_maker (xi, yi, zi) box{ < xi, yi, zi >, < 0.0, 0.0, 0.0> texture { tx_fosca } } #end /* #declare letreiro = text { ttf "arial.ttf", "UFMS" 0.3, 1 texture { tx_plastico } } */ #declare cadeira_pe = box_maker(0.25, 0.25, 2.0); #declare cadeira_assento = box_maker(1.25, 1.25, 0.25); #declare cadeira_encosto = box_maker(0.25, 1.25, 1.50); #declare cadeira = union{ #declare i=0; #declare j=0; #while(i<2) #while(j<2) object { cadeira_pe translate < i, j, 0 > } #declare j=j+1; #end #declare i=i+1; #declare j=0; #end object { cadeira_assento translate < 0.0, 0.0, 1.75 > } object { cadeira_encosto translate < 1.0, 0.0, 2.0 > } } #declare mesa_pe = box_maker(0.25, 0.25, 3.0); #declare mesa_prancha = box_maker(4.0, 10.0, 0.25); #declare mesa = union { #declare i=0; #declare j=0; #while(i<2) #while(j<2) object { mesa_pe translate < i*3.75, j*9.75, 0 > } #declare j=j+1; #end #declare i=i+1; #declare j=0; #end object { mesa_prancha translate < 0.0, 0.0, 2.75 > } } #declare teclado = box_maker(0.75, 1.25, 0.10); #declare monitor_tela = box_maker(0.25, 1.25, 1.0); #declare monitor_suporte = box_maker(0.25, 0.50, 0.50); #declare monitor = union { object {monitor_suporte translate < 0.25, 0.40, 0.50 > } object {monitor_tela translate < 0.50, 0.00, 0.25 > rotate < 0.0, -15, 0.0 > } } #declare computador = union { object {monitor} object {teclado translate < 0.50, 0.0, 0.0 > } } #macro conjunto (luck) union { #local i=0; object {mesa} #while (i<3) #if ( (luck != 2 | i != 1) & (luck+i != 3) ) object {cadeira translate < 4.0, i*3.0+1.5, 0.0 > } #end object {computador translate < 1.25, i*3.0+1.5, 3.0 > } #declare i=i+1; #end } #end #macro fileira(altura) #declare chao = box_maker( 10.0, 25.0, altura*0.25); union { object {chao} object {conjunto(altura) translate < 3.0, 8.5, altura*0.50 > } } #end #declare fila = fileira(1); // Aqui est� a cena, finalmente: #declare quadro = box_maker( 1.0, 15.0, 5.0 ); #declare cont=4; #declare parede_fundo = wall_maker( 0.50, 40, 30 ); #declare parede_lado = wall_maker( 0.50, 40, 30 ); #declare cena = union { #declare i=1; #while (i<=cont) object { fileira(cont-i) translate < (-i)*10, 0.0, 0.0 > } #declare i=i+1; #end object { quadro translate < -50.0, 2.5, 5.0 > } //object { letreiro translate < -50.0, 2.5, 11.5 > } object { parede_fundo texture { tx_quadro } translate < -50.50, -12.5, 0.0 > } object { parede_lado rotate < 0, 0, 90 > translate < 0.0, -12.5, 0.0 > } } object {cena}