// Last edited on 2019-07-17 02:47:08 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_plastico = texture{ pigment{ color rgb < 0.30, 0.70, 0.70 > } finish{ diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #declare tx_fosca = texture{ pigment{ color rgb < 0.70, 0.70, 0.80 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_pedra = texture{ pigment { color rgb <0.4, 0.2, 0> } finish { diffuse 0.9 ambient 0.1 } } #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 12.0 } #macro plastico_cor(i) texture { pigment { color rgb < i, 0, 0> } finish { diffuse 0.8 ambient 0.1 specular 0.5 roughness 0.005 } } #end #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 r = (tt-t0)/(t1-t0); #local s = 1-r; #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 #declare NP = 9; #declare STEPS = 400; #declare SHARPNESS = 10; #declare points = array[NP]; #declare points[0] = <0,0.4,0>; #declare points[1] = <0,1.6,0>; #declare points[2] = <1,1,0>; #declare points[3] = <0.5,0.4,0>; #declare points[4] = <1,2,-0.5>; #declare points[5] = <1,1.4,0.3>; #declare points[6] = <0.5,0.9,0.1>; #declare points[7] = <1,1,-0.3>; #declare points[8] = <0.5,0.5,-0.2>; #declare i = 0; #while (i < NP) #declare j = 0; #declare v1 = points[i]-points[mod(NP+i-1, NP)]; #declare v2 = points[mod(i+2, NP)]-points[mod(i+1, NP)]; #while (j < STEPS) sphere { arcobezier(0, 1, points[i], points[i]+v1/SHARPNESS, points[mod(i+1, NP)]-v2/SHARPNESS, points[mod(i+1, NP)], j/STEPS), 7/STEPS texture{tx_fosca} } #declare j = j+1; #end #declare i = i+1; #end #include "eixos.inc" // object{ eixos(1.0) } #include "camlight.inc" #declare centro_cena = < 0.40, 1.00, 0.10 >; #declare raio_cena = 1.05; #declare dir_camera = < -5, -2.00, 3.00 >; #declare dist_camera = 5; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)