// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_blue = texture{ pigment{ color rgb < 0.10, 0.80, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_green = texture{ pigment{ color rgb < 0.10, 1.00, 0.20 > } 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 0.22 } #include "eixos.inc" #include "math.inc" #macro Interpola2(p0, p1, tt) ((1-tt)*p0 + tt*p1) #end #macro Interpola4(p0, p1, p2, p3, tt) #local p01 = Interpola2(p0, p1, tt); #local p12 = Interpola2(p1, p2, tt); #local p23 = Interpola2(p2, p3, tt); #local p012 = Interpola2(p01, p12, tt); #local p123 = Interpola2(p12, p23, tt); #local p0123 = Interpola2(p012, p123, tt); p0123 #end #macro curva(ai, af, r, n) #declare bradius = 0.01; union { #declare i = 0; #while (i <= n) sphere{ Interpola4(ai[0]*abs(1-2*clock)+af[0]*(1-abs(1-2*clock)), ai[1]*abs(1-2*clock)+af[1]*(1-abs(1-2*clock)), ai[2]*abs(1-2*clock)+af[2]*(1-abs(1-2*clock)), ai[3]*abs(1-2*clock)+af[3]*(1-abs(1-2*clock)), i / n), Interpola4(r[0], r[1], r[2], r[3], i / n) } #declare i = i+1; #end } #end #declare a0i = array[4] {<0,0,0>, <1,-2,0>, <2,2,0>, <3,0,0>}; #declare a1i = array[4] {<3,0,0>, <4,-2,0>, <5,2,0>, <6,0,0>}; #declare b0i = array[4] {<0,0,0>, <1,-2,0>, <2,2,0>, <3,0,0>}; #declare b1i = array[4] {<3,0,0>, <4,-2,0>, <5,2,0>, <6,0,0>}; #declare c0i = array[4] {<0,0,0>, <1,0,-2>, <2,0,2>, <3,0,0>}; #declare c1i = array[4] {<3,0,0>, <4,0,-2>, <5,0,2>, <6,0,0>}; #declare a0f = array[4] {<0,0,0>, <1,2,0>, <2,-2,0>, <3,0,0>}; #declare a1f = array[4] {<3,0,0>, <4,2,0>, <5,-2,0>, <6,0,0>}; #declare b0f = array[4] {<0,0,0>, <1,2,0>, <2,-2,0>, <3,0,0>}; #declare b1f = array[4] {<3,0,0>, <4,2,0>, <5,-2,0>, <6,0,0>}; #declare c0f = array[4] {<0,0,0>, <1,0,2>, <2,0,-2>, <3,0,0>}; #declare c1f = array[4] {<3,0,0>, <4,0,2>, <5,0,-2>, <6,0,0>}; #declare radius0 = array[4] {0.1, 0.5, 1, 0.6}; #declare radius1 = array[4] {0.6, 0.2, 0.01, 0}; #declare smilei = array[4] {<-0.3,0,0>, <-0.1,0,-0.2>, <0.1,0,-0.2>, <0.3,0,0>}; #declare smilef = array[4] {<-0.3,0,-0.1>, <-0.1,0,0.2>, <0.1,0,-0.2>, <0.3,0,0.1>}; #declare r_smile = array[4] {0.01,0.01,0.01,0.01}; #declare n_points = 128; #macro tentaculo(a0i, a0f, a1i, a1f, radius0, radius1, tx0, tx1, n_points) union { object{ curva(a0i, a0f, radius0, n_points) texture{ tx0 } } object{ curva(a1i, a1f, radius1, n_points) texture{ tx1 } } } #end #macro polvo() union { object { tentaculo(a0i, a0f, a1i, a1f, radius0, radius1, tx_green, tx_blue, n_points) } object { tentaculo(b0i, b0f, b1i, b1f, radius0, radius1, tx_blue, tx_fosca, n_points) rotate<0,0,120> } object { tentaculo(c0i, c0f, c1i, c1f, radius0, radius1, tx_xadrez, tx_green, n_points) rotate<0,0,240> } object{ sphere{<0,0,0>, 1.2} scale<1,1,2> translate<0,0,1> texture{ tx_green } } object{ sphere{<0,0,0>, 0.1} translate<1.1,0.15,1.8> } object{ sphere{<0,0,0>, 0.1} translate<1.1,-0.15,1.8> } object{ curva(smilei, smilef, r_smile, n_points) rotate<0,0,90> translate<1.2,0,1.6> } } #end union{ object{ eixos(3.00) } object{ polvo() } } #include "camlight.inc" #declare centro_cena = < 1.00, -0.80, 1.00 >; #declare raio_cena = 7; #declare dir_camera = < 4.00, -1.00, 4.00 >; #declare dist_camera = 16.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)