//ALUNO: Pedro Henrique Machado Martins camera{ location < 24.00, 17.00, 17.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, 1.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 cor da 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 cor da 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_plastico = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_espelho = texture{ pigment{ color rgb < 1.00, 0.90, 0.70 > } finish{ diffuse 0.1 reflection 0.8*< 1.00, 0.90, 0.70 > ambient 0.1 } } #declare tx_furo = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > filter 0.70 } finish{ diffuse 0.01 ambient 0.02} } #declare tx_vidro = texture{ pigment{ color rgb < 0.97, 0.98, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #declare tx_world = texture{ pigment{ color rgb < 1.0, 1.0, 1.0 > } finish{ diffuse 0.01 ambient 0.02} } // ====================================================================== // DESCRI��O DA CENA #declare raio = 2.000; // Partes da cena: /* #declare bolinha = sphere{ < 0,0,0 >, 0.60 } #declare bolota = sphere{ < 0,0,0 >, 1.50 } #declare bola_grande = sphere{ < 0.00, 0.00, 0.00 >, raio texture{ tx_plastico } */ #declare pino = cylinder{ < 0.00, 0.00, 0.00 >, < 0.00, 0.00, +2.00 >, 1.5 texture{ tx_fosca } } #declare furo = cylinder{ < 0.00, 0.00, 0.00 >, < 0.00, 0.00, +2.00 >, 0.5 texture{ tx_fosca } } #declare manivela1 = cylinder{ < 0.00, 0.00, 0.00 >, < +0.25, 0.00, 0.00 >, 0.25 texture{ tx_plastico } } #declare manivela2 = cylinder{ < 0.00, 0.00, 0.00 >, < 0.00, 0.00, +1.00 >, 0.25 texture{ tx_plastico } } #declare manivela3 = cylinder{ < 0.00, 0.00, 0.00 >, < +0.4, 0.00, 0.00 >, 0.1 texture{ tx_plastico } } #declare saida = cylinder{ < 0.00, 0.00, 0.00 >, < 0.00, 2.00, 0.00 >, 0.25 texture{ tx_plastico } } #declare box1 = box{ < 5.00, 5.00, 5.00 >, < 0, 0, 0 > } #declare cena = union { object{ manivela1 translate < 1.5,0,1.5 > } object{ manivela2 rotate 180*y translate < 1.75,0,1.7 > } object{ manivela3 translate < 2.0, 0, 0.8 > } object{ saida translate < 0, 0, 0.8 > } difference{ object{ pino translate < 0,0,0 > } object{ furo translate < 0,0,0.3 > } } } // Aqui est� a cena, finalmente: union{ object{ eixos(20.00) } object{ cena translate < 5, 0, 0 > } intersection{ object { box1 translate < -7.5, -2.5, -2.5 > texture{ tx_fosca } } object { cena translate < -2.5, 0.0, 0.0 > } } }