// 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 < 30.00, 1.00, 20.00 > // Posição do observador. right -0.45*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.00, 2.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. } // ====================================================================== // 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_madeira = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_ferro = texture{ pigment{ color rgb < 0.6, 0.6, 0.6 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 reflection 0.1*< 0.6, 0.6, 0.6 > } } #declare tx_plastico = texture{ pigment{ color rgb < 1,1,1 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 reflection 0.1*< 0.6, 0.6, 0.6 > } } #declare tx_tela = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 0.92,0.8,0.51 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.20 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_quadro = texture{ pigment{ image_map { jpeg "imagem.jpg" } scale < 4,3,1 > } finish{ diffuse 0.8 ambient 0.2 } } // ====================================================================== // DESCRIÇÃO DA CENA // Partes da cena: #declare cadeira_assento = box { < 0,0,0 >, < 1,1,0.1 > } #declare cadeira_pe = box { < 0,0,0 >, < 0.15,0.15,1 > } #declare cadeira_encosto = box { < 0,0,0 >, < 0.8,0.1,0.8 > } #declare cadeira_encosto_ferro = box { < 0,0,0 >, < 0.4,0.07,0.7 > } #declare mesa_base = box { < 0,0,0 >, < 2,1,0.2 > } #declare mesa_pe = box { < 0,0,0 >, < 0.3,0.3,2 > } #declare monitor_caixa = box { < 0,0,0 >, < 1.4,0.2,1.2 > } #declare monitor_tela_corte = box { < 0,0,0 >, < 1.2,0.15,1 > } #declare monitor_tela = box { < 0,0,0 >, < 1.2,0.1,1 > } #declare monitor_base = box { < 0,0,0 >, < 0.3,0.15,0.2 > } #declare degrau = box { < 0,0,0 >, < 10,2,0.5 > } #declare parede = box { < 0,0,0 >, < 10,0.5,10 > } #declare quadro = box { < 0,0,0 >, < 4,3,0.1 > } //------- OBJETOS ----------- #declare cadeira = //CADEIRA union { object{ cadeira_assento translate < 0,0,0 > texture{ tx_madeira } } object{ cadeira_pe translate < 0,0,-1 > texture{ tx_ferro } } object{ cadeira_pe translate < 0.8,0,-1 > texture{ tx_ferro } } object{ cadeira_pe translate < 0.8,0.8,-1 > texture{ tx_ferro } } object{ cadeira_pe translate < 0,0.8,-1 > texture{ tx_ferro } } object{ cadeira_encosto_ferro translate < 0.3,0,0 > texture{ tx_ferro } } object{ cadeira_encosto translate < 0.1,0,0.7 > texture{ tx_madeira } } } #declare mesa = //MESA union { object{ mesa_base translate < 0,0,0 > texture{ tx_madeira } } object{ mesa_pe translate < 0,0,-2 > texture{ tx_ferro } } object{ mesa_pe translate < 0,0.7,-2 > texture{ tx_ferro } } object{ mesa_pe translate < 1.7,0,-2 > texture{ tx_ferro } } object{ mesa_pe translate < 1.7,0.7,-2 > texture{ tx_ferro } } } #declare monitor = //MONITOR union { difference { object{ monitor_caixa translate < 0,0,0 > texture{ tx_plastico } } object{ monitor_tela_corte translate < 0.1,-0.01,0.1 > texture{ tx_plastico } } } object{ monitor_tela translate < 0.1,0,0.1 > texture{ tx_tela } } object{ monitor_base translate < 0.55,0.02,-0.2 > texture{ tx_plastico } } } #declare obj_cena = union { object{ mesa translate < 0,0.8,2 > } object{ cadeira translate < 0.5,0.3,1 > } object{ monitor translate < 0.35,1.4,2.4 > } } //------- CENA ----------- union { object{ eixos(4.00) } #declare i=0; #while (i < 3) #declare j=-4.75; object{ degrau translate < -5,i*2,-0.5+(i*0.5) > texture{ tx_fosca } } #while (j < 4) #if (i != 0 | j != 0.25) object{ obj_cena translate < j,i*2,i*0.5 > } #end #declare j=j+2.5; #end #declare i=i+1; #end text { ttf "arial.ttf" "LABORATORIO" 0.3,0 rotate 90*x translate < -3,5,7 > texture{ tx_vidro } } object{ parede translate < -5,6,0 > texture{ tx_fosca } } object{ quadro texture{ tx_quadro } rotate 90*x translate < -5,6,7 > } translate < 0,-4,-5 > rotate 90*z //rotate 20*x }