// Last edited on DATE TIME by USER // Processed by remove-cam-lights #include "eixos.inc" #include "retalho-simples.inc" #include "colors.inc" background{ color rgb < 0, 0, 0 > } #declare Yellow = rgb<255, 255, 0>; #declare Black = rgb < 0.4, 0.4, 0.4 >; #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 } } #declare tx_fosca = texture{ pigment{ color rgb < 0.105, 0.105, 0.105 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_fosca2 = texture{ pigment{ color rgb < 0.50, 0.80, 0.2 > } finish{ diffuse 0.9 ambient 0.1 } } #declare esfera = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_fosca } } #declare N = 4; #declare NV = 2; #declare NH = 3; object{ eixos(3.00) } #declare P = array[NV][NH][N][N]; #for (i, 0, NV-1 , 1) #for (j, 0, NH-1 , 1) #for (k, 0, N-1 , 1) #for (l, 0, N-1 , 1) #declare P[i][j][k][l] = <3*i+k,3*j+l,0>; #end #end #end #end #declare P[0][0][0][0] = <0,0,-1>; #declare P[1][0][3][0] = <6,0,-1>; #declare P[0][2][0][3] = <0,9,-1>; #declare P[1][2][3][3] = <6,9,-1>; #declare P[0][0][1][1] = <1,1,5>; #declare P[0][2][1][1] = <1,7,5>; #declare P[1][0][1][1] = <4,1,5>; #declare P[1][2][1][1] = <4,7,5>; #macro carroceria (PP, NH, NV, N) union { #declare Z = array[N][N]; #for (i, 0, NV-1 , 1) #for (j, 0, NH-1 , 1) #for (k, 0, N-1 , 1) #for (l, 0, N-1 , 1) #declare Z[k][l] = P[i][j][k][l]; #end #end object { retalho(Z, 0.01, tx_fosca, tx_fosca2) } #end #end } #end #macro emenda_retalho (PP, r0, s0, r1, s1) #if ((r0 = r1) & (s0+1 = s1)) #for (i, 0, N-1 , 1) #declare PP[r0][s0][i][3] = (P[r0][s0][i][2] + P[r1][s1][i][1])/2; #declare PP[r1][s1][i][0] = (P[r0][s0][i][2] + P[r1][s1][i][1])/2; #end #end #if ((r0+1 = r1) & (s0 = s1)) #for (i, 0, N-1 , 1) #declare PP[r0][s0][3][i] = (P[r0][s0][2][i] + P[r1][s1][1][i])/2; #declare PP[r1][s1][0][i] = (P[r0][s0][2][i] + P[r1][s1][1][i])/2; #end #end #end emenda_retalho(P, 1, 0, 1, 2) object { carroceria(P, NH, NV, N) } #include "camlight.inc" #declare centro_cena = < -5.50, 0.00, -1.70 >; #declare raio_cena = 8.0; #declare dir_camera = < 200.00, 100.00, 70.00 >; #declare dist_camera = 20*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)