// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2009-03-09 18:44:03 by stolfi // ====================================================================== // CÂMERA camera{ location 0.8*< -20.00, 20.00, 12.00 > // Posição do observador. //location < 6.00, 2.00, 2.00 > // Posição do observador. right -0.9*x // Largura RELATIVA da imagem. up 0.60*y // Altura RELATIVA da imagem. sky z // Qual direção é "para cima"? //look_at < 0.00, 0.50, 1.00 > // Para onde a câmera está apontando. look_at < -3.00, 2.00, 3.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 corda 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 corda luz. //} //light_source{ // 10 * < -50.0, -10.0, +10.0 > // Posição da lâmpada. // color rgb 0.7 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. //} light_source{ < -4.0, 3, 10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ < -8.0, 3, 10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ < -8.0, 6, 10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ < -4.0, 6, 10.0 > // Posição da lâmpada. color rgb 0.5 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source{ < -8.0, 15, 6.0 > // Posição da lâmpada. color rgb 0.3 * < 1.00, 1.00, 1.00 > // Intensidade e corda 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_mesa = texture { pigment { color rgb <0.5,0.5,0.5> } finish{ diffuse 0.9 ambient 0.4 } } #declare tx_cadeira = texture { pigment { color rgb <0.9,0.85,0.4> } finish{ diffuse 0.4 ambient 0.2 } } #declare tx_banco = texture { pigment { color rgb <0.1,0.1,0.1> } finish{ diffuse 0.4 ambient 0.2 } } #declare tx_texto = texture { pigment { color rgb <0.1,0.1,0.1> } finish{ diffuse 0.4 ambient 0.2 } } #declare tx_chao = texture { pigment { color rgb <0.45,0.45,0.30> } finish{ diffuse 0.6 reflection ambient 0.3 } } #declare tx_parede = texture { pigment { color rgb <1.00,1.00,1.00> } finish{ diffuse 0.6 ambient 0.3 } } #declare tx_pc = texture { pigment { color rgb <0.4,0.4,0.4> } finish{ diffuse 0.6 ambient 0.1 } } #declare tx_img = texture { pigment { image_map{ jpeg "petersen.jpg"} scale<4,4,1> } finish{ ambient 1.0 } } // ====================================================================== // DESCRIÇÃO DA CENA //#declare rad = 0.2; //#declare dist = 0.5; //#declare i = 0; //#declare j = 0; //#declare n = 12; //#declare m = 10; //#declare r = 5; //#declare c = 7; //#while (i < n) // #while (j < m) // #if (i = r & j = c) // sphere {<0, j*dist, i*dist>, rad} // #else // sphere {<0, j*dist, i*dist>, rad texture{tx_vidro}} // #end // #declare j = j + 1; // #end // #declare i = i + 1; // #declare j = 0; //#end #declare mesa = difference { box {<1.5, 0, 0>, <-1.5, 1, 1> texture {tx_mesa}} box {<1.45, 0.1, -0.1>, <-1.45, 1.1, 0.95> texture {tx_mesa}} } #declare cadeira = union { difference { box{<0.4, 1.4, 0>, <-0.4, 1.45, 1.5> texture{tx_cadeira}} box{<0.35, 1.3, 0.60>, <-0.35, 1.5, 1.2> texture{tx_cadeira}} box{<0.35, 1.3, 0.55>, <-0.35, 1.5, -1.2> texture{tx_cadeira}} } difference { box{<0.4, 0.9, 0>, <-0.4, 0.95, 0.60> texture{tx_cadeira}} box{<0.35, 0.8, 0.55>, <-0.35, 1.0, -1.2> texture{tx_cadeira}} } box{<0.4,0.90,0.60>,<-0.4,1.4,0.75> texture{tx_banco}} } #declare pc = union { box {<-1, 0.85, 1>,<-1.3, 0.15, 1.6> texture {tx_pc}} box {<0.4,0.7,1>,<-0.4,0.95,1.05> texture{tx_pc}} cylinder{<0,0.35,1>, <0,0.35,1.05>, 0.25 texture{tx_pc}} cylinder{<0,0.35,1>, <0,0.35,1.2>, 0.025 texture{tx_pc}} box {<0.45,0.325,1.2>,<-0.45,0.375,1.7> texture{tx_pc}} } #declare loc = union { object{mesa} object{cadeira} object{pc} } #declare paredes = union { box {<1, -3.0, 0>,<1.2, 10, 6> texture {tx_parede}} box {<1, -3.0, 0>,<-12, -3.5, 6> texture {tx_parede}} } #declare texto = text {ttf "arial.ttf" "LabFACOM" 1, 0 texture{tx_texto} rotate<90,0,0> rotate<0,0,180> translate<-3.5,-3.985,5>} #declare img = box{<-4,0.0,0.75>, <-8,4.0,0.751> texture{tx_img}} #declare i = 0; #declare j = 0; #declare n = 5; #declare m = 3; #declare r = 0; #declare c = 1; #declare distx = -4; #declare disty = 2; #declare distz = 0.5; union { #while (i < n) box{<1,i*disty-0.3,0>, texture{tx_chao}} #while (j < m) #if (i != r | j != c) object{loc translate} #end #declare j = j + 1; #end #declare i = i + 1; #declare j = 0; #end object{paredes} box{<1,-3,0><-12,8,-1> texture{tx_chao}} object{texto} object{img rotate<90,0,0> translate<0,-2.25,0.75>} }