// Last edited on DATE TIME by USER // Processed by remove-cam-lights #macro quadro(tt) #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 100.0; #declare dir_camera = <20,0,5>; #declare dist_camera = 100.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz) background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_preto = texture{ pigment{ color rgb < 0.00, 0.00, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_rosa = texture{ pigment{ color rgb < 1, 0.4, 0.8 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vermelho = texture{ pigment{ color rgb < 1, 0, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_pele = texture{ pigment{ color rgb < 1, 0.72, 0.51 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_verde = texture{ pigment{ color rgb < 0.49, 0.99 , 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_escada = texture{ pigment{ color rgb < .5,.6,.8 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_branco = texture{ pigment{ color rgb < 1, 1, 1 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_azul = texture{ pigment{ color rgb < 0, 0, 1 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_amarelo = texture{ pigment{ color rgb <1,1,0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 0.20, 0.67, 0.20 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #include "retalho.inc" #macro interpol2(ta,A,tb,B,tt) #local s = (tt-ta)/(tb-ta); ((1-s)*A+s*B); #end #macro interpol4(ta,A,B,C,D,td,tt) #local AB = interpol2(ta,A,td,B,tt); #local BC = interpol2(ta,B,td,C,tt); #local CD = interpol2(ta,C,td,D,tt); #local ABC = interpol2(ta,AB,td,BC,tt); #local BCD = interpol2(ta,BC,td,CD,tt); #local ABCD = interpol2(ta,ABC,td,BCD,tt); ABCD #end #local A22 = <5,3,7>; #local A23 = <5,5,0>; #local A32 = <10,3,7>; #local A33 = <10,5,0>; #local B12 = <-6,2,6>; #local B13 = <-6,2,4>; #local B22 = <-4,3.5,6>; #local B23 = <-4,3.5,3>; #local B32 = <-2,3,7>; #local B33 = <-2,5,0>; #local C22 = <18,3,7>; #local C23 = <18,5,0>; #local C32 = <23,2,5>; #local C33 = <23,2,2>; #local C42 = <23,0,3.5>; #local C43 = <23,0,3.5>; #macro asa(cor) intersection{ sphere{<0,0,0>,10} box{<2,0,0.5>,<12,12,-0.5>} translate <-2,0,0> scale <0.8,-2,1> texture{cor} } #end #macro corpo(P11,P12,P13,P14,P21,P22,P23,P24,P31,P32,P33,P34,P41,P42,P43,P44,cor) union{ object{ retalho(P11,P12,P13,P14,P21,P22,P23,P24,P31,P32,P33,P34,P41,P42,P43,P44,0.0001,tx_verde,cor) } } #end #macro aviao(A22,A23,A32,A33,B12,B13,B22,B23,B32,B33,C22,C23,C32,C33,C42,C43,cor) union{ #local A21=; #local A24=; #local A31=; #local A34=; #local B21=; #local B24=; #local B31=; #local B34=; #local B11=; #local B14=; #local C41=; #local C44=; #local C21=; #local C24=; #local C31=; #local C34=; #local A41=(A31+C21)/2; #local A42=(A32+C22)/2; #local A43=(A33+C23)/2; #local A44=(A34+C24)/2; #local C11=A41; #local C12=A42; #local C13=A43; #local C14=A44; object{corpo(C11,C12,C13,C14,C21,C22,C23,C24,C31,C32,C33,C34,C41,C42,C43,C44,cor)} object{corpo(C11,C12,C13,C14,C21,C22,C23,C24,C31,C32,C33,C34,C41,C42,C43,C44,cor) scale <1,-1,1>} #local A11=(A21+B31)/2; #local A12=(A22+B32)/2; #local A13=(A23+B33)/2; #local A14=(A24+B34)/2; #local B41=A11; #local B42=A12; #local B43=A13; #local B44=A14; object{corpo(B11,B12,B13,B14,B21,B22,B23,B24,B31,B32,B33,B34,B41,B42,B43,B44,cor) } object{corpo(B11,B12,B13,B14,B21,B22,B23,B24,B31,B32,B33,B34,B41,B42,B43,B44,cor) scale -1*y} object{corpo(A11,A12,A13,A14,A21,A22,A23,A24,A31,A32,A33,A34,A41,A42,A43,A44,cor)} object{corpo(A11,A12,A13,A14,A21,A22,A23,A24,A31,A32,A33,A34,A41,A42,A43,A44,cor) scale -1*y} object { asa(cor) translate <4,-2,3.5> } object { asa(cor) translate <4,-2,3.5> scale <1,-1,1> } object { asa(cor) scale <0.3,0.3,0.3> translate <-5.7,-1,5.5>} object { asa(cor) scale <0.3,0.3,0.3> translate <-5.7,-1,5.5> scale <1,-1,1> } object { asa(cor) scale <0.3,0.3,0.3> rotate -90*x translate <-5.7,0,6> } } #end #macro aviao_voando(P2,P3,P5,P6,P8,P9,P11,P12,cor) #local P1=(P2+P12)/2; #local P4=(P3+P5)/2; #local P7=(P6+P8)/2; #local P10=(P9+P11)/2; #declare t0 = 0; #declare t1 = 0.25; #declare t2 = 0.5; #declare t3 = 0.75; #declare t4 = 1; #if ((clock>=t0) & (clock<=t1)) #local X = interpol4(t0,P1,P2,P3,P4,t1,clock); #local alfa = interpol2(t0,0,t1,-90,tt); #end #if ((clock>t1) & (clock<=t2)) #local X = interpol4(t1,P4,P5,P6,P7,t2,clock); #local alfa = interpol2(t1,-90,t2,-180,tt); #end #if ((clock>t2) & (clock<=t3)) #local X = interpol4(t2,P7,P8,P9,P10,t3,clock); #local alfa = interpol2(t2,-180,t3,-270,tt); #end #if ((clock>t3) & (clock; #local P3=<-40,-20,10>; #local P5=<-40,-20,20>; #local P6=<-20,-10,25>; #local P8=<20,10,25>; #local P9=<40,20,20>; #local P11=<40,20,10>; #local P12=<20,10,5>; #local R2=<-20,20,20>; #local R3=<-10,10,10>; #local R5=<10,-10,10>; #local R6=<20,-20,20>; #local R8=<20,-20,40>; #local R9=<10,-10,50>; #local R11=<-10,10,50>; #local R12=<-20,20,40>; object{ aviao_voando(P2,P3,P5,P6,P8,P9,P11,P12,tx_amarelo) } object{ aviao_voando(R2,R3,R5,R6,R8,R9,R11,R12,tx_vermelho)} } #end quadro(clock)