// Last edited on 2017-05-07 20:22:58 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare body_texture = texture{ pigment{ color rgb < 0.350, 0.600, 1.000 > } finish { diffuse 0.90 ambient 0.10 } } #macro interpola_1(tt, tt0, vv0, tt1, vv1) #local ss = (tt-tt0)/(tt1-tt0); (vv0+ss*(vv1-vv0)) #end #macro gera_segmento_1(m, p0, r0, p1, r1) #local indice = 0; union { #while (indice < m) #local ponto = interpola_1(indice, 0, p0, m-1, p1); #local raio = interpola_1(indice, 0, r0, m-1, r1); object{ sphere { ponto, raio } } #local indice = indice + 1; #end } #end #macro interpola_3(tt, t0, t1, A, B, C, D) #local AB = interpola_1(tt, t0, A, t1, B); #local BC = interpola_1(tt, t0, B, t1 C); #local CD = interpola_1(tt, t0, C, t1, D); #local ABC = interpola_1(tt, t0, AB, t1, BC); #local BCD = interpola_1(tt, t0, BC, t1, CD); #local ABCD = interpola_1(tt, t0, ABC, t1, BCD); ABCD #end #macro gera_segmento_3(m, pA, rA, pB, rB, pC, rC, pD, rD) #local indice = 0; union { #while (indice < m) #local ponto = interpola_3(indice, 0, m-1, pA, pB, pC, pD); #local raio = interpola_3(indice, 0, m-1, rA, rB, rC, rD); object{ sphere { ponto, raio } } #local indice = indice + 1; #end } #end #macro define_tentaculo(n, PA, PB, PC, PD) #local indice = 0; #while (indice < n) #local indice = indice + 1; #end #end #macro gera_monstro() union { object{ sphere{ <0, 0, 0>, 10 } texture{ body_texture } } object{ sphere{ <0, 0, 10>, 8 } texture{ body_texture } } } #end #include "eixos.inc" union{ // object{ eixos(150.00) } object{ gera_segmento_3(250, <0, 0, 0>, 5, <25, 25, 25>, 2, <-50, 50, 50>, 2, <100, 100, 100>, 2) texture{ body_texture } } } #include "camlight.inc" #declare centro_cena = < 100.00, 50.00, 50.00 >; #declare raio_cena = 160.0; #declare dir_camera = < 14.00, -7.00, 4.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)