// Last edited on 2019-07-17 00:53:29 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 RAIO = 1; #declare BOLAS = 300; #macro interpolin(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 = interpolin(t0, A, t1, B, tt); #local BC = interpolin(t0, B, t1, C, tt); #local CD = interpolin(t0, C, t1, D, tt); #local ABC = interpolin(t0, AB, t1, BC, tt); #local BCD = interpolin(t0, BC, t1, CD, tt); #local ABCD = interpolin(t0, ABC, t1, BCD, tt); ABCD #end #declare esfera = sphere { <0,0,0>, RAIO texture {tx_plastico}}; #macro makeRound(diametro) #union{ #declare i = 0; #while(i; #declare d_start = <10,0,0>; #declare p_stop = <0,20,10>; #declare d_stop = <10,20,10>; #declare centro = arcobezier(0,BOLAS-1, p_start, d_start, d_stop, p_stop, i); object { esfera translate centro texture{tx_plastico} } #else #if(i; #declare d_start = <-10,20,10>; #declare p_stop = <-20,10,-10>; #declare d_stop = <-30,10,0>; #declare centro = arcobezier(BOLAS,2*BOLAS-1, p_start, d_start, d_stop, p_stop, i); object { esfera translate centro texture{tx_plastico} } #else #declare p_start = <-20,10,-10>; #declare d_start = <-10,10,-20>; #declare p_stop = <0,0,0>; #declare d_stop = <-10,0,0>; #declare centro = arcobezier(2*BOLAS,3*BOLAS-1, p_start, d_start, d_stop, p_stop, i); object { esfera translate centro texture{tx_plastico} } #end #end #declare i = i+1; #end } #end object { makeRound(10) } #include "eixos.inc" // object{ eixos(20) } #include "camlight.inc" #declare centro_cena = < 0.00, 20.00, 3.00 >; #declare raio_cena = 25; #declare dir_camera = < 2.00, 3.00, 1.00 >; #declare dist_camera = 10*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)