// Last edited on 2010-12-15 22:56:22 by stolfilocal // Processed by remove-cam-lights background { color rgb < 1.00, 1.00, 1.00 > } #declare vermelho = texture { pigment { color rgb < 1.00, 0.00, 0.00 > } } #declare verde = texture { pigment { color rgb < 0.00, 1.00, 0.00 > } } #declare azul = texture { pigment { color rgb < 0.00, 0.00, 1.00 > } } #declare cinza = texture { pigment { color rgb < 0.33, 0.33, 0.33 > } } #declare branco = texture { pigment { color rgb < 1.00, 1.00, 1.00 > } } #declare Metallic_Finish = finish { metallic ambient 0.1 diffuse 0.65 specular 0.85 roughness 0.01 reflection 0.45 brilliance 1.5 } #declare Aluminum = texture { pigment { rgb <0.55, 0.5, 0.45> } finish { Metallic_Finish } } #declare Starfield = texture { pigment { granite color_map { [0.72 rgb 0.00] [0.72 rgb 0.20] [0.75 rgb 0.40] [0.78 rgb 0.60] [0.81 rgb 0.80] [0.85 rgb 0.95] [0.91 rgb 1.00] [0.91 rgb 0.00] } scale 0.015 } finish { ambient 1 } } #include "eixos.inc" #macro pe() box { <-0.50, -0.50, -0.25> <0.50, 1.50, 0.25> texture { cinza } } #end #macro canela(a) union { cylinder { <0.00, 0.00, 0.50> <0.00, 0.00, -2.50>, 0.50 texture { vermelho } } object { pe() rotate a * x translate -2.50 * z } } #end #macro coxa(a, b) union { cylinder { <0.00, 0.00, 0.50> <0.00, 0.00, -2.50>, 0.50 texture { azul } } object { canela(a) rotate b * x translate -2.50 * z } } #end #macro bicho(a, b, c, h) union { sphere { <0.00, 0.00, 2.00>, 2.00 texture { verde } } object { coxa(a, b) rotate c * x } translate h * z } #end #macro interpola(ta, va, tb, vb, tt) #local s = (tt - ta) / (tb - ta); ((1 - s) * va + s * vb) #end #macro armacao(fase) #local fase0 = 0.000; #local fase1 = 0.500; #local fase2 = 1.000; #if ((fase >= fase0) & (fase <= fase1)) #declare a = interpola(fase0, 0, fase1, 10, fase); #declare b = interpola(fase0, -10, fase1, -30, fase); #declare c = interpola(fase0, 10, fase1, 30, fase); #declare h = interpola(fase0, 0, fase1, -2.50, fase); #end #if ((fase >= fase1) & (fase <= fase2)) #declare a = interpola(fase1, 10, fase2, 0, fase); #declare b = interpola(fase1, -30, fase2, -10, fase); #declare c = interpola(fase1, 30, fase2, 10, fase); #declare h = interpola(fase1, -2.50, fase2, 0.00, fase); #end bicho(a, b, c, h) #end #macro armacao_geral(p, fase) object { armacao(fase) translate p } #end #macro voo(altura, fase) #local fase0 = 0.000; #local fase1 = 0.500; #local fase2 = 1.000; #if ((fase >= fase0) & (fase <= fase1)) #declare a = interpola(fase0, 0, fase1, -20, fase); #declare b = interpola(fase0, -10, fase1, -30, fase); #declare c = interpola(fase0, 10, fase1, -15, fase); #declare h = interpola(fase0, 0, fase1, altura, fase); #end #if ((fase >= fase1) & (fase <= fase2)) #declare a = interpola(fase1, -20, fase2, 0, fase); #declare b = interpola(fase1, -30, fase2, -10, fase); #declare c = interpola(fase1, -15, fase2, 10, fase); #declare h = interpola(fase1, altura, fase2, 0.00, fase); #end bicho(a, b, c, h) #end #macro voo_geral(altura, p, q, fase) #local r = interpola(0, p, 1, q, fase); object { voo(altura, fase) translate r } #end #macro quadro(tt) #local t0 = 0.000; #local t1 = 0.250; #local t2 = 0.500; #local t3 = 0.750; #local t4 = 1.000; #if ((tt >= t0) & (tt <= t1)) #declare pontoP = <0.00, -6.00, 0.00>; #local fase = interpola(t0, 0, t1, 1, tt); armacao_geral(pontoP, fase) #end #if ((tt >= t1) & (tt <= t2)) #declare pontoP = <0.00, -6.00, 0.00>; #declare pontoQ = <0.00, 0.00, 0.00>; #local fase = interpola(t1, 0, t2, 1, tt); voo_geral(3.00, pontoP, pontoQ, fase) #end #if ((tt >= t2) & (tt <= t3)) #declare pontoP = <0.00, 0.00, 0.00>; #local fase = interpola(t2, 0, t3, 1, tt); armacao_geral(pontoP, fase) #end #if ((tt >= t3) & (tt <= t4)) #declare pontoP = <0.00, 0.00, 0.00>; #declare pontoQ = <0.00, 6.00, 0.00>; #local fase = interpola(t3, 0, t4, 1, tt); voo_geral(3.00, pontoP, pontoQ, fase) #end #end quadro(clock) #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 15.00; #declare dir_camera = < 1.00, 0.00, 0.00 >; #declare dist_camera = 15.00; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)