// Last edited on 2019-07-17 02:55:19 by stolfilocal // Processed by remove-cam-lights #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 } } background{ color rgb < 0.75, 0.80, 0.85 > } #macro CriaCurva(raio) #declare curva = spline { natural_spline -0.25, < 0.0,-5.0,-1.0>, 0.00, < 0.0, 0.0, 0.0>, 0.25, < 0.0, 5.0, 4.0>, 0.50, < 1.5, 6.0,12.0>, 0.75, < 8.0, 4.0,18.5>, 1.00, <15.0, 5.0,20.0>, 1.25, <20.0, 5.0,19.4> } #end #macro InterpolacaoLinear(x0, y0, x1, y1, tt) #local delta = x1 - x0; #local r = (tt - x0)/delta; #local s = 1 - r; #local vv = s*y0 + r*y1; vv #end #macro arcobevier(t0, t1, A, B, C ,D, tt) #local AB = InterpolacaoLinear(t0, A, t1, B, tt); #local BC = InterpolacaoLinear(t0, B, t1, C, tt); #local CD = InterpolacaoLinear(t0, C, t1, D, tt); #local ABC = InterpolacaoLinear(t0, AB, t1, BC, tt); #local BCD = InterpolacaoLinear(t0, BC, t1, CD, tt); #local ABCD = InterpolacaoLinear(t0, ABC, t1, BCD, tt); ABCD #end #macro palito(R, N, p, q, uu, cor) #local palto = union { #local tt = p.x; #while (tt < q.x) sphere{ <0,0,0>, R pigment{ color cor } translate } #local tt = tt + uu; #end } palto #end #macro CriaNo(n_voltas, raio_corda, espacamento_entre_bolas) #declare uu = 0.07; #declare bolas = 10; #local PEA = <3, 5, 7>; #local VEA = <-1, +1, 0>; #local PAB = <8, 10 ,10>; #local VAB = <1, -1, 2>; #declare A1 = PEA; #declare A2 = A1 + VEA; #declare A4 = PAB; #declare A3 = A4 - VAB; #declare palitos = array[4]; #declare palitos[0] = palito(raio_corda, 10, A1, A2, uu, rgb<0.2, 0.4, 0.5>); #declare palitos[1] = palito(raio_corda, 10, A2, A3, uu, rgb<0.1, 0.4, 0.6>); #declare palitos[2] = palito(raio_corda, 10, A3, A4, uu, rgb<0.6, 0.2, 0.5>); #declare palitos[3] = palito(raio_corda, 10, A4, A1, uu, rgb<0.2, 0.4, 0.3>); union { #declare i = 0; #while (i < 4) object { palitos[i] } #declare i = i + 1; #end } #end CriaNo(5, 0.1, 1) #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.50 >; #declare raio_cena = 10.0; #declare dir_camera = < 10.00, 10.00, 10.00 >; #declare dist_camera = 2*raio_cena; #declare intens_luz = 1.20; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)