// Frederico Jose Fortuna - RA032927 // MC930 - Atividade 02 // ====================================================================== // CÂMERA camera { location < 36.00, 28.00, 18.00 > // Posição do observador. right -1.00*x // Largura RELATIVA da imagem. up 0.75*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? look_at < 0.00, 0.00, 0.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.2 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { 10 * < +50.0, -10.0, +10.0 > // Posição da lâmpada. color rgb 0.8 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare raio = 2.000; #declare tinta_A = texture { pigment { color rgb < 255.00, 255.00, 255.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_B = texture { pigment { color rgb < 0.00, 0.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_C = texture { pigment { color rgb < 0.00, 0.30, 1.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_D = texture { pigment { color rgb < 0.00, 1.00, 0.00 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } #declare tinta_E = texture { pigment { color rgb < 5.00, 5.00, 0.50 > } finish { diffuse 0.5 specular 0.5 roughness 0.005 ambient 0.1 } } // Aqui está a cena, finalmente: //union { //object { casa_branca } //object { casa_preta } //object { peao } //object { torre } //object { rei } //} //difference { // object { pa } // object { bola_base } //} //difference { // object { pa // rotate 90*z // } // object { bola_base } //} //} #declare roleta=seed(12345); #declare i=0; #while (i<20) #declare j=0; #while(j<20) #declare a = mod((i+j),2); #if(a=0) #declare cor = tinta_A; #end #if(a=1) #declare cor = tinta_B; #end box { < i-5.00, j-5.00, +0.00 >, < i-4.00, j-4.00, -0.20 > texture { cor } } #declare n=int(1000*rand(roleta)); #declare n=mod(n,10); #if(n=0) sphere { < i-4.50, j-4.50, 0.25 >, 0.25 texture { tinta_C } } #end #if(n=1) cone { < i-4.50, j-4.50, 0.00 >, 0.4 < i-4.50, j-4.50, 1.40 >, 0.0 texture { tinta_E } } #end #if(n=2) cylinder { < i-4.50, j-4.50, 0.00 >, < i-4.50, j-4.50, +1.00 >, 0.3 texture { tinta_D } } #end #declare j=j+1; #end #declare i=i+1; #end