// Last edited on 2019-07-17 05:00:09 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.15, 0.80, 0.55 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.10, 0.70, 1.00 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare esfera = sphere { < 0, 0, 0>, 0.25 // Near lower left corner texture{ tx_plastico } } #declare N=3; #declare P = array[N][4]; #declare P[0][0] = <0,6,0>; #declare P[0][1] = <0.6,7.5,0>; #declare P[0][2] = <3.2,7.5,0>; #declare P[0][3] = <4,6,0>; #declare P[1][0] = <4,6,0>; #declare P[1][1] = <6,3,0>; #declare P[1][2] = <13,3,0>; #declare P[1][3] = <14,6,0>; #declare P[2][0] = <14,6,0>; #declare P[2][1] = <15,7.5,0>; #declare P[2][2] = <17.5,7.5,0>; #declare P[2][3] = <18,6,0>; #declare Q = array[N][4]; #declare Q[0][0] = <18,6,0>; #declare Q[0][1] = <17.5,4.5,0>; #declare Q[0][2] = <15,4.5,0>; #declare Q[0][3] = <14,6,0>; #declare Q[1][0] = <14,6,0>; #declare Q[1][1] = <13,9.5,0>; #declare Q[1][2] = <6,9.5,0>; #declare Q[1][3] = <4,6,0>; #declare Q[2][0] = <4,6,0>; #declare Q[2][1] = <3.2,4.5,0>; #declare Q[2][2] = <0,4.5,0>; #declare Q[2][3] = <0,6,0>; #macro interpola(to, vo, t1, v1, tt ) #local r = (tt-to)/(t1-to); #local s = 1-r; #local vv= s*vo+r*v1; vv #end #macro arcobezier(to, t1, a, b, c, d, tt ) #local ab = interpola(to, a, t1, b, tt ); #local bc = interpola(to, b, t1, c, tt ); #local cd = interpola(to, c, t1, d, tt ); #local abc = interpola(to, ab, t1, bc, tt ); #local bcd = interpola(to, bc, t1, cd, tt ); #local abcd = interpola(to, abc, t1, bcd, tt ); abcd #end #macro arco(a0, a1, a2, a3, t0, t1, n) union{ #declare passo = 1/n; #declare j = t0; #while (j <= t1) object { esfera translate arcobezier(t0,t1, a0, a1, a2, a3, j)} #declare j=j+passo; #end } #end #macro suaviza(P,i,N) #local j = mod(i+1, N); #local vv = (P[j][1]-P[i][2])/2; #declare P[i][2]= P[i][3]-vv; #declare P[j][1]= P[j][0]+vv; #end #macro noh(P, N, M) #local i = 0; union{ #local i = 0; #declare lado = M/N; #while(i < N ) object {arco (P[i][0], P[i][1], P[i][2], P[i][3], (i*lado), (i+1)*lado, M) } #local i = i+1; #end } #end #macro interpolaMatriz(PQ, QQ, N, CO, CI, cc, R) #local i=0; #while (i; #end #end #macro imatrizes(P, Q, N) union{ #for(cc, 0, 1, 0.2) interpolaMatriz(P, Q, N, 0, 1, cc, R) object{noh(R, N, 20) translate 10*cc*z} #end } #end object{imatrizes(P,Q,3)} #include "eixos.inc" //object{ eixos(3.00) } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 4.00 >; #declare raio_cena = 13.0; #declare dir_camera = < 45.00, 20.00, 10.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , y, intens_luz)