// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.4, 0.4, 0.4 > } #declare Yellow = rgb<255, 255, 0>; #declare Black = rgb < 0.4, 0.4, 0.4 >; #declare tx_plastico1 = 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_plastico2 = texture{ pigment{ color Yellow } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #include "eixos.inc" #include "retalho-simples.inc" object{ eixos(3.00) } #declare pontos= array[4][4]; #declare pontos[0][0]=<0,0,0>; #declare pontos[0][1]=<0,1,0>; #declare pontos[0][2]=<0,2,0>; #declare pontos[0][3]=<0,4,0>; #declare pontos[1][0]=<0,1,1>; #declare pontos[1][1]=<0,2,1>; #declare pontos[1][2]=<0,3,1>; #declare pontos[1][3]=<0,4,1>; #declare pontos[2][0]=<0,1,2>; #declare pontos[2][1]=<0,2,2>; #declare pontos[2][2]=<0,3,2>; #declare pontos[2][3]=<0,4,2>; #declare pontos[3][0]=<0,1,4>; #declare pontos[3][1]=<0,2,4>; #declare pontos[3][2]=<0,3,4>; #declare pontos[3][3]=<0,4,4>; #declare nh= 3; #declare nv= 2; #declare PP = array[nh][nv][4][4]; #macro graderetalhos(nh, nv) #for(h, 0, nh-1, 1) #for(n, 0, nv-1, 1) #for(i, 0, 3, 1 ) #for(j, 0, 3, 1) #declare PP[h][n][i][j]= < 3*h+i, 3*n+j, 0>; #end #end #end #end #declare PP[0][0][0][0] = <0,0,-1>; #declare PP[0][1][0][3] = <6,0,-1>; #declare PP[2][0][3][0] = <9,0,-1>; #declare PP[2][1][3][3] = <9,6,-1>; #declare PP[1][0][1][0] = <4,0,2>; #declare PP[1][0][1][1] = <4,1,2>; #declare PP[1][0][1][2] = <4,2,2>; #declare PP[1][0][1][3] = <4,3,2>; #end #macro carro( nh, nv) union{ #declare p=array[4][4] #for(h, 0, nh-1, 1) #for(n, 0, nv-1, 1) #for(i,0, 3, 1) #for(j, 0, 3, 1) #declare p[i][j] = PP[h][n][i][j]; #end #end object{retalho(p ,0.01 ,tx_plastico2,tx_plastico1)} #end #end } #end #macro emenda(r0,s0,r1,s1) #if(s0 = s1) //vert #for(i,0,3,1) #declare PP[r0][s0][3][i] = (PP[r0][s0][2][i] + PP[r1][s1][1][i])/ 2; #declare PP[r1][s1][0][i] = PP[r0][s0][3][i]; #end #end #if(r0 = r1) //hori #for(i,0,3,1) #declare PP[r0][s0][i][3] = (PP[r0][s0][i][2] + PP[r1][s1][i][1])/ 2; #declare PP[r1][s1][i][0] = PP[r0][s0][i][3]; #end #end #end graderetalhos(3, 2) emenda(1,0,1,1) carro(3,2) #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 10.0; #declare dir_camera = < 14.00, 7.00, 4.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.2; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)