// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2003-09-04 15:25:26 by stolfi // ====================================================================== // CÂMERA camera { location < 40.00, 30.00, 20.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 cor_cinza = < 0.5, 0.5, 0.5 >; #declare metal = texture { pigment { rgb cor_cinza } finish { ambient 0.05 diffuse 0.05 reflection cor_cinza specular 0.20 roughness 0.05 } } #declare cor_azulado = <0.9,0.9,1>; #declare vidro = texture { finish { ambient 0.1 diffuse 0.1 reflection 0.25 specular 1 roughness 0.001 } pigment { color cor_azulado filter 1 } } #declare paredao = plane { z, 0 texture { pigment { checker <0,0,0>, <1,1,1> } finish { ambient 01 diffuse 0.9 } } } #declare porta = union { box { <0,0,0>, <0.1,2.999,2.5> texture { vidro } } box { <0,3.001,0>, <0.1,6,2.5> texture { vidro } } } #declare janela = box { <0,0,0>, <0.1,2,1> texture { vidro } } #declare predio = #declare andar=0; #while (andar<4) union { box { <-10.5,-10.5,0>, <10.5,10.5,3> texture { metal } } #declare face=0; #while (face<4) #declare j=0; #while (j<7) #if ((andar=0) & (face=0) & (j=2)) object { porta translate <10.5,-3,0> } #declare j=4; #else object { janela translate <10.5,-10+3*j,1> rotate z*90*face} #end //end_if #declare j=j+1; #end //end_while #declare face=face+1; #end //end_while translate <0,0,3*andar> } #declare andar=andar+1; #end //end_while #declare esferas= #declare G=seed(12345); #declare H=seed(54321); #declare canto1=mod(rand(G),4); #declare raio1=mod(rand(G),2)+0.5; #declare canto2=mod(rand(H),4); #declare raio2=mod(rand(H),2)+0.5; #if (canto1=canto2) canto2=mod((canto2+1),4); #end #declare x1=0; #declare y1=0; #if (canto1=0) #declare x1=1; #declare y1=-1; #end #if (canto1=1) #declare x1=1; #declare y1=1; #end #if (canto1=2) #declare x1=-1; #declare y1=1; #end #if (canto1=3) #declare x1=-1; #declare y1=-1; #end union { sphere { <(x1*10.5),(y1*10.5),(12+raio1)> raio1 } } // Aqui está a cena, finalmente: object { predio } object { esferas }