// Last edited on DATE TIME by USER // Processed by remove-cam-lights #include "textures.inc" background{ color rgb < 0.15, 0.40, 0.95 > } #declare tx_verde = texture{ pigment{ color rgb < 0.10, 0.90, 0.10 > } } #declare tx_azul = texture{ pigment{ color rgb < 0.15, 0.30, 1.00 > } } #declare tx_bege = texture{ pigment{ color rgb < 0.85, 0.90, 0.30 > } } #declare tx_vermelho = texture{ pigment{ color rgb < 0.95, 0.50, 0.30 > } } #declare chao = box{ <-50,-50,-10>, <+20,+20,0> } #macro interpola(ta, va, tb, vb, tt) #local s = (tt - ta) / (tb-ta); ((1-s)*va + s*vb) #end #include "eixos.inc" #include "retalho.inc" #local A12 = <1,0, 0>; #local A13 = <2, 0, 0>; #local A22 = <1, 0.8, -1>; #local A23 = <1.9, 1.5, -1>; #local A32 = <1, 0.5, -2>; #local A33 = <1.9, 1, -2>; #local A42 = <1, 0, -3>; #local A43 = <1.8, 0, -3>; #local B12 = <4, 0, 0>; #local B13 = <5, 0, 0>; #local B22 = <4, 1, -1.9>; #local B23 = <5, 1, -1.9>; #local B32 = <4, 0.5, -2.7>; #local B33 = <5, 0.5, -2.7>; #local B42 = <4, 0, -3>; #local B43 = <5, 0, -3>; #local C12 = <7, 0, 0>; #local C13 = <7.8, 0, 0>; #local C14 = <8, 0, 0>; #local C22 = <7, 1, -1.9>; #local C23 = <7.8, 1, -1.9>; #local C32 = <7, 0.5, -2.7>; #local C33 = <7.8, 0.5, -2.7>; #local C42 = <7, 0, -3>; #local C43 = <7.8, 0, -3>; #macro parte(A12, A13, A22, A23, A32, A33, A42, A43, B12, B13, B22, B23, B32, B33, B42, B43, C12, C13, C22, C23, C32, C33, C42, C43) union { #local A11 = ; #local A14 = (A13 + B12) / 2; #local A21 = ; #local A24 = (A23 + B22) / 2; #local A31 = ; #local A34 = (A33 + B32) / 2; #local A41 = ; #local A44 = (A43 + B42) / 2; object{retalho(A11,A12,A13,A14, A21, A22, A23, A24, A31, A32, A33, A34, A41, A42, A43, A44, 0.005, tx_bege, tx_vermelho)} #local B11 = A14; #local B14 = (B13 + C12) / 2; #local B21 = A24; #local B24 = (B23 + C22) / 2; #local B31 = A34; #local B34 = (B33 + C32) / 2; #local B41 = A44; #local B44 = (B43 + C42) / 2; object{retalho(B11,B12,B13,B14, B21, B22, B23, B24, B31, B32, B33, B34, B41, B42, B43, B44, 0.005, tx_bege, tx_vermelho)} #local C11 = B14; #local C14 = ; #local C21 = B24; #local C24 = ; #local C31 = B34; #local C34 = ; #local C41 = B44; #local C44 = ; object{retalho(C11, C12, C13, C14, C21, C22, C23, C24, C31, C32, C33, C34, C41, C42, C43, C44, 0.005, tx_bege, tx_vermelho)} } #end #macro aviao(A12, A13, A22, A23, A32, A33, A42, A43, B12, B13, B22, B23, B32, B33, B42, B43, C12, C13, C22, C23, C32, C33, C42, C43) union { object { parte(A12, A13, A22, A23, A32, A33, A42, A43, B12, B13, B22, B23, B32, B33, B42, B43, C12, C13, C22, C23, C32, C33, C42, C43) } object { parte(A12, A13, A22, A23, A32, A33, A42, A43, B12, B13, B22, B23, B32, B33, B42, B43, C12, C13, C22, C23, C32, C33, C42, C43) scale y*(-1) } } #end #macro deform1(P) #local cons = -0.5 * sin(pi * P.y / 4); #end #macro deform2(P) #local cons = 0.5 * sin(pi * P.x / 4); #end #macro aviao_deformado(d1, d2) #local DA12 = A12 + deform1(A12)*d1 + deform2(A12)*d2; #local DA13 = A13 + deform1(A13)*d1 + deform2(A13)*d2; #local DA22 = A22 + deform1(A22)*d1 + deform2(A22)*d2; #local DA23 = A23 + deform1(A23)*d1 + deform2(A23)*d2; #local DA32 = A32+ deform1(A32)*d1 + deform2(A32)*d2; #local DA33 = A33 + deform1(A33)*d1 + deform2(A33)*d2; #local DA42 = A42+ deform1(A42)*d1 + deform2(A42)*d2; #local DA43 = A43 + deform1(A43)*d1 + deform2(A43)*d2; #local DB12 = B12 + deform1(B12)*d1 + deform2(B12)*d2; #local DB13 = B13 + deform1(B13)*d1 + deform2(B13)*d2; #local DB22 = B22 + deform1(B22)*d1 + deform2(B22)*d2; #local DB23 = B23 + deform1(B23)*d1 + deform2(B23)*d2; #local DB32 = B32+ deform1(B32)*d1 + deform2(B32)*d2; #local DB33 = B33 + deform1(B33)*d1 + deform2(B33)*d2; #local DB42 = B42+ deform1(B42)*d1 + deform2(B42)*d2; #local DB43 = B43 + deform1(B43)*d1 + deform2(B43)*d2; #local DC12 = C12 + deform1(C12)*d1 + deform2(C12)*d2; #local DC13 = C13 + deform1(C13)*d1 + deform2(C13)*d2; #local DC22 = C22 + deform1(C22)*d1 + deform2(C22)*d2; #local DC23 = C23 + deform1(C23)*d1 + deform2(C23)*d2; #local DC32 = C32+ deform1(C32)*d1 + deform2(C32)*d2; #local DC33 = C33 + deform1(C33)*d1 + deform2(C33)*d2; #local DC42 = C42+ deform1(C42)*d1 + deform2(C42)*d2; #local DC43 = C43 + deform1(C43)*d1 + deform2(C43)*d2; aviao(DA12, DA13, DA22, DA23, DA32, DA33, DA42, DA43, DB12, DB13, DB22, DB23, DB32, DB33, DB42, DB43, DC12, DC13, DC22, DC23, DC32, DC33, DC42, DC43) #end union{ object{ eixos(3.00) } object{ chao translate < 0,0,-5 > texture{ tx_verde } } object { aviao_deformado(1, 0) translate <0,0,4>} object { aviao_deformado(0, 1) } scale 0.5 } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 10.0; #declare dir_camera = < 15.00, 16.00, 2.00 >; #declare dist_camera = 32.0; #declare intens_luz = 1.50; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)