// 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 <1.9, 0.4, -0.4 > // Posição do observador. right -1*x // Largura RELATIVA da imagem. up 0.50*y // Altura RELATIVA da imagem. sky y // Qual direção é "para cima"? look_at <0.50, 0.25, 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 { < -2.0, +2.0, -2.0 > // Posição da lâmpada. color rgb 2.0 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < -2.0, +2.0, +2.0 > // Posição da lâmpada. color rgb 2.0 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } light_source { < +2.0, +2.0, 0.0 > // Posição da lâmpada. color rgb 2.0 * < 1.00, 1.00, 1.00 > // Intensidade e corda luz. } // ====================================================================== // DESCRIÇÃO DA CENA background{ color rgb < 0.75, 0.80, 0.85 > } #declare tinta_braco = texture { pigment { color rgb < 0.60, 0.60, 0.60 > } finish { diffuse 0.05 specular 0.20 roughness 0.05 ambient 0.05 reflection color rgb < 0.60, 0.60, 0.60 > } } #declare tinta_robo = texture { pigment { color rgb < 0.40, 0.40, 0.40 > } } #declare cor_caixa_rotacao = texture { pigment { color rgb < 0.10, 0.10, 0.10 > } } // Ângulos iniciais e finais do movimento planejado. #declare angGarraIni = 30; #declare angGarraFim = 5; #declare angRotIni = 90; #declare angRotFim = -10; #declare angHorIni = 20; #declare angHorFim = -60; #declare angVerIni = -50; #declare angVerFim = -5; // Ângulo de abertura da garra, de 0 a 90º. 0 é a garra fechada. #declare angGarra = angGarraIni + clock * (angGarraFim - angGarraIni); // Ângulo de rotação entre 2º e 3º braços. Entre -90º e +90º #declare angRot = angRotIni + clock * (angRotFim - angRotIni); // Ângulo de articulação entre 1º e 2º braços. O Eixo é vertical e a rotação na // horizontal. #declare angHor = angHorIni + clock * (angHorFim - angHorIni); // Ângulo de articulação entre o troco e o 1º braço. O eixo é horizontal e o // movimento é vertical. #declare angVer = angVerIni + clock * (angVerFim - angVerIni); #declare pinca = object { difference { cylinder { <0,0,-0.05>, <0,0,+0.05>, 0.06 } cylinder { <0,0,-0.06>, <0,0,+0.06>, 0.05 } box { <-0.07, -0.07, -0.06>, <+0.07,0,+0.06> } } translate <+0.06,0,0> texture { tinta_braco } } #declare garra = union { object { pinca rotate angGarra*z } object { pinca rotate 180*x rotate -angGarra*z } } #declare braco3 = union { cone { <0,0,0>, 0.05, <+0.10,0,0>, 0.025 texture { tinta_braco } } box { <0,-0.05,-0.005>, <+0.10,+0.05,+0.005> texture { cor_caixa_rotacao }} object { garra translate <+0.11,0,0> } } #declare braco2 = union { cylinder { <0,0,0>, <+0.10,0,0>, 0.05 texture { tinta_braco } } cylinder { <+0.09,0,0>, <+0.12,0,0> 0.03 texture { tinta_braco } } object { braco3 rotate angRot*x translate <+0.11,0,0> } } #declare braco1 = union { cylinder { <0,0,0>, <+0.20,0,0>, 0.05 texture { tinta_braco } } sphere { <+0.23,0,0>, 0.06 texture { tinta_braco } } object { braco2 rotate angHor*y translate <+0.26,0,0> } } #declare robo = union { box { <-0.20,0,-0.20>, <+0.20,+0.60,+0.20> texture { tinta_robo } } sphere { <+0.23,+0.45,0>, 0.06 texture { tinta_braco } } object { braco1 rotate angVer*z translate <+0.26,+0.45,0> } } #declare chao = plane { y, 0 texture { pigment { checker <0.20, 0.20, 0.05>, <0.10, 0.10, 0.25> } finish {ambient 0.1 diffuse 0.9} scale 3 } } // A cena union { object { robo } object { chao } }