// Last edited on 2019-07-17 03:57:38 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_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 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 #macro arco(A, B, C, D) union { #local j = 0; #while (j < STEPS) sphere { arcobezier(0, 1, A, B, C, D, j/STEPS), 10/STEPS texture{tx_fosca} } #local j = j + 1; #end } #end #declare NA = 11; #declare STEPS = 400; #declare SHARPNESS = 10; #declare endpoints = array[NA]; #declare endpoints[0] = <0,0.4,0>; #declare endpoints[1] = <-0.2,1.0,0>; // #declare endpoints[2] = <0,1.5,0>; #declare endpoints[3] = <0.4,1.6,0>; #declare endpoints[4] = <1,1,0>; #declare endpoints[5] = <0.5,0.4,0>; #declare endpoints[6] = <1,2,-0.5>; #declare endpoints[7] = <1,1.4,0.3>; #declare endpoints[8] = <0.5,0.9,0.1>; #declare endpoints[9] = <1,1,-0.3>; #declare endpoints[10] = <0.5,0.5,-0.2>; #declare arcpoints = array[NA][4]; #declare i = 0; #while (i < NA) #declare v1 = endpoints[i] - endpoints[mod(NA+i-1, NA)]; #declare v2 = endpoints[mod(i+2, NA)] - endpoints[mod(i+1, NA)]; #declare arcpoints[i][0] = endpoints[i]; #declare arcpoints[i][1] = endpoints[i] + v1/SHARPNESS; #declare arcpoints[i][2] = endpoints[mod(i+1, NA)] - v2/SHARPNESS; #declare arcpoints[i][3] = endpoints[mod(i+1, NA)]; #declare i = i+1; #end #declare i = 0; #while (i < NA) object { arco(arcpoints[i][0], arcpoints[i][1], arcpoints[i][2], arcpoints[i][3]) } #declare i = i + 1; #end #include "eixos.inc" //object{ eixos(1) } #include "camlight.inc" #declare centro_cena = < 0.00, 0.80, 0.50 >; #declare raio_cena = 1.1; #declare dir_camera = < -5, -2.00, 5.00 >; #declare dist_camera = 5; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)