// Last edited on DATE TIME by USER // Processed by remove-cam-lights 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.85, 0.30 > } finish{ diffuse 0.2 reflection 0.7*< 1.00, 0.85, 0.30 > ambient 0.1 } } #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_xadrez = texture{ pigment{ checker color rgb < 0.10, 0.32, 0.60 >, color rgb < 1.00, 0.97, 0.90 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #include "retalho-simples.inc" #include "colors.inc" #declare NV = 2; #declare NH = 3; #declare P = array[NV][NH][4][4]; #local ii = 0; #local jj = 0; #local kk = 0; #local ll = 0; #declare P[ii][jj][kk][ll] = <-15,-10,0>; #while (ii < NV) #local jj = 0; #while (jj < NH) #local kk = 0; #while (kk < 4) #local ll = 0; #while (ll < 4) #declare P[ii][jj][kk][ll] = <(10*jj+ll*(10/3))-15,(10*ii+kk*(10/3))-10, 0>; #local ll = ll + 1; #end #local kk = kk + 1; #end #local jj = jj + 1; #end #local ii = ii + 1; #end #declare P[0][2][2][2] = <11.666667,-4.666667, 5>; #declare P[0][2][1][2] = <11.666667,-6.666667, 3.725>; #declare P[1][2][1][2] = <11.666667,4.666667, 5>; #declare P[1][2][2][2] = <11.666667,6.666667, 3.725>; #declare P[0][2][2][1] = <8.333333,-3.333333, 5>; #declare P[0][2][1][1] = <8.333333,-6.666667, 3.725>; #declare P[1][2][1][1] = <8.333333,3.333333, 5>; #declare P[1][2][2][1] = <8.333333,6.666667, 3.725>; #declare P[0][1][2][2] = <1.666667,-3.333333, 15>; #declare P[0][1][1][2] = <1.666667,-6.666667, 9.5>; #declare P[1][1][1][2] = <1.666667,3.333333, 15>; #declare P[1][1][2][2] = <1.666667,6.666667, 9.5>; #declare P[0][1][2][1] = <-1.666667,-3.333333, 15>; #declare P[0][1][1][1] = <-1.666667,-6.666667, 9.5>; #declare P[1][1][1][1] = <-1.666667,3.333333, 15>; #declare P[1][1][2][1] = <-1.666667,6.666667, 9.5>; #declare P[0][0][2][2] = <-8.333333,-3.333333, 5>; #declare P[0][0][1][2] = <-8.333333,-6.666667, 3.725>; #declare P[1][0][1][2] = <-8.333333,3.666667, 5>; #declare P[1][0][2][2] = <-8.333333,6.666667, 3.725>; #declare P[0][0][2][1] = <8.333333,-3.333333, 5>; #declare P[0][0][1][1] = <8.333333,-6.666667, 3.725>; #declare P[1][0][1][1] = <8.333333,3.333333, 5>; #declare P[1][0][2][1] = <8.333333,6.666667, 3.725>; #debug concat("!!piloP", str(P[0][0][1][2].x,8,6),"\n") #debug concat("!!piloP", str(P[0][0][1][2].y,8,6),"\n") #macro emenda_retalho (PP, rv0,rh0,rv1,rh1) #if (rv0 < rv1) #local PP[rv0][rh0][3][0] = (PP[rv0][rh0][2][0] + PP[rv1][rh1][1][0])/2; #local PP[rv0][rh0][3][1] = (PP[rv0][rh0][2][1] + PP[rv1][rh1][1][1])/2; #local PP[rv0][rh0][3][2] = (PP[rv0][rh0][2][2] + PP[rv1][rh1][1][2])/2; #local PP[rv0][rh0][3][3] = (PP[rv0][rh0][2][3] + PP[rv1][rh1][1][3])/2; #local PP[rv1][rh1][0][0] = PP[rv0][rh0][3][0]; #local PP[rv1][rh1][0][1] = PP[rv0][rh0][3][1]; #local PP[rv1][rh1][0][2] = PP[rv0][rh0][3][2]; #local PP[rv1][rh1][0][3] = PP[rv0][rh0][3][3]; #end #if (rh0 < rh1) #local PP[rv0][rh0][0][3] = (PP[rv0][rh0][0][2] + PP[rv1][rh1][0][1])/2; #local PP[rv0][rh0][1][3] = (PP[rv0][rh0][1][2] + PP[rv1][rh1][1][1])/2; #local PP[rv0][rh0][2][3] = (PP[rv0][rh0][2][2] + PP[rv1][rh1][2][1])/2; #local PP[rv0][rh0][3][3] = (PP[rv0][rh0][3][2] + PP[rv1][rh1][3][1])/2; #local PP[rv1][rh1][0][0] = PP[rv0][rh0][0][3]; #local PP[rv1][rh1][1][0] = PP[rv0][rh0][1][3]; #local PP[rv1][rh1][2][0] = PP[rv0][rh0][2][3]; #local PP[rv1][rh1][3][0] = PP[rv0][rh0][3][3]; #end PP #end #declare P = emenda_retalho(P,0,0,1,0); #declare P = emenda_retalho(P,0,0,0,1); #declare P = emenda_retalho(P,1,0,1,1); #declare P = emenda_retalho(P,0,1,1,1); #declare P = emenda_retalho(P,1,1,1,2); #declare P = emenda_retalho(P,0,1,0,2); #declare P = emenda_retalho(P,0,2,1,2); #macro carroceria (PP, NH, NV) #local ii = 0; #local jj = 0; #while (ii < NV) #local jj = 0; #while (jj < NH) object{ retalho( PP, 0.2, texture{pigment{color White}}, texture{tx_fosca} , ii, jj) } #local jj = jj + 1; #end #local ii = ii + 1; #end #end carroceria (P, NH, NV) #include "eixos.inc" #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 40; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)