// Last edited on 2017-05-07 20:47:43 by stolfilocal // Processed by remove-cam-lights background{ color rgb < 1, 1, 1 > } #declare tx_olho = texture{ pigment{ color rgb <0,0,1> } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_pele = texture{ pigment{ color rgb <1,0,0> } finish{ diffuse 0.9 ambient 0.1 } } #macro interpola_1(tt, tt0, vv0, tt1, vv1) #local ss = (tt - tt0)/(tt1 - tt0); (vv0 + ss*(vv1 - vv0)) #end #macro gera_segmento_1(dt, p0, r0, p1, r1) union { #declare i = 0; #while(i < dt) sphere{interpola_1(i, 0, p0, dt, p1), interpola_1(i, 0, r0, dt, r1)} #declare i = i + 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(dt, p0, r0, p1, r1, p2, r2, p3, r3) union { #declare i = 0; #while(i < dt) sphere{interpola_3(i, 0, dt, p0, p1, p2, p3), interpola_3(i, 0, dt, r0, r1, r2, r3)} #declare i = i + 1; #end } #end #macro gera_monstro() union { sphere{<0, 0, 0>, 8 texture{tx_pele}} sphere{<5.5, -5.5, 5.5>, 1.5 texture{tx_olho}} sphere{<5.5, -5.5, 5.5>, 1.5 texture{tx_olho} translate<5, 5>} } #end #include "eixos.inc" #declare p0 = <1, 1, 1>; #declare r0 = 2.3; #declare p1 = <15, 15, 15>; #declare r1 = 0.4; #declare p2 = <10, -24, 20>; #declare r2 = 1.5; #declare p3 = <-30, 12, 19>; #declare r3 = 0.9; union{ // object{ eixos(20.00) } object{gera_segmento_3(50, p0, r0, p1, r1, p2, r2, p3, r3) texture{tx_pele}} } #include "camlight.inc" #declare centro_cena = < 2.00, 0.00, 15.00 >; #declare raio_cena = 25.0; #declare dir_camera = < 14.00, -7.00, 8.00 >; #declare dist_camera = 5*raio_cena; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)