// Last edited on 2019-07-17 04:36:53 by stolfilocal // 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 } #macro interpolaLin (t0, v0, t1, v1, tt) #local r = (tt-t0)/(t1-t0); #local s = 1-r; #local vv = s*v0 + r*v1; vv #end #macro arcobezier (t0, t1, A, B, C, D, tt) #local AB = interpolaLin(t0,A,t1,B,tt); #local BC = interpolaLin(t0,B,t1,C,tt); #local CD = interpolaLin(t0,C,t1,D,tt); #local ABC = interpolaLin(t0,AB,t1,BC,tt); #local BCD = interpolaLin(t0,BC,t1,CD,tt); #local ABCD = interpolaLin(t0,ABC,t1,BCD,tt); ABCD #end #macro suaviza(p, vv, M) #local ii = 1; #local p[M-1][2] = p[0][0] - vv[0]; #local p[0][1] = p[0][0] + vv[0]; #local p[M-1][3] = p[0][0]; #while (ii < M) #local p[ii-1][3] = p[ii][0]; #local p[ii-1][2] = p[ii][0] - vv[ii]; #local p[ii][1] = p[ii][0] + vv[ii]; #local ii = ii+1; #end p #end #macro poligono (N, M) #local tt = 0; #local ii = 1/N; #local p = array[M][4]; #local vv = array[M]; #local vv[0] = <100,200,0>; #local vv[1] = <100,200,0>; #local vv[2] = <100,200,0>; #local vv[3] = <-150,100,0>; #local vv[4] = <-100,200,50>; #local p[0][0] = <0,0,0>; #local p[1][0] = <400,0,0>; #local p[2][0] = <400,400,0>; #local p[3][0] = <0,400,0>; #local p[4][0] = <-200,0,100>; #local p = suaviza(p,vv,M); #while (tt < 1) union{ object {sphere {arcobezier(0.0, 1.0, p[0][0], p[0][1], p[0][2], p[0][3],tt), 20.00 texture{tx_fosca}}} object {sphere {arcobezier(0.0, 1.0, p[1][0], p[1][1], p[1][2], p[1][3],tt), 20.00 texture{tx_fosca}}} object {sphere {arcobezier(0.0, 1.0, p[2][0], p[2][1], p[2][2], p[2][3],tt), 20.00 texture{tx_fosca}}} object {sphere {arcobezier(0.0, 1.0, p[3][0], p[3][1], p[3][2], p[3][3],tt), 20.00 texture{tx_fosca}}} object {sphere {arcobezier(0.0, 1.0, p[4][0], p[4][1], p[4][2], p[4][3],tt), 20.00 texture{tx_fosca}}} } #local tt = tt + ii; #end #end poligono(1000,5) #include "eixos.inc" //object{ eixos(100) } #include "camlight.inc" #declare centro_cena = < 80.00, 180.00, 1.00 >; #declare raio_cena = 650; #declare dir_camera = < 10.00, 10.00, 10.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)