// Last edited on 2013-12-11 11:16:27 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 tx_fosca = texture{ pigment{ color rgb < 1.00, 0.80, 0.10 > } finish{ diffuse 0.9 ambient 0.1 } } #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 } } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #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 2.0 } #declare tx_azul = texture{ pigment{ color rgb < 0.00, 0.00, 1.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_vermelho = texture{ pigment{ color rgb < 1.00, 0.00, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_verde = texture{ pigment{ color rgb < 0.00, 1.00, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } #declare tx_amarelo = texture{ pigment{ color rgb < 1.00, 1.00, 0.00 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_cinza = texture{ pigment{ color rgb < 0.80, 0.80, 0.80 > } finish{ diffuse 0.9 ambient 0.1 } } #declare tx_grafite = texture{ pigment{ color rgb < 0.70, 0.70, 0.70 > } finish{ diffuse 0.7 ambient 0.1 specular 0.25 } } #declare tx_prata = texture{ pigment{ color rgb < 0.75, 0.75, 0.75 > } finish{ diffuse 0.9 ambient 0.3 specular 0.25 } } #declare tx_preto = texture{ pigment{ color rgb < 0.2, 0.2, 0.2 > } finish{ diffuse 0.9 ambient 0.1 } } } #macro bola( r ) union{ sphere{ < 0,0,0 >, r } // r = 0.2 } #end #declare cabeca = sphere{ < 0,0,0 >, 1 } #macro interpola2(p0, p1, tt) #local p = (1-tt)*p0 + tt*p1 ; p #end #macro desenha(p0, p1, n) #declare nn = 0; union{ #while(nn < n) object{ bola(0.5*(n - nn)/n) translate interpola2(p0, p1, nn/n) texture{tx_azul} } #declare nn = nn + 1; #end } #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,p2,tt); #local p123 = interpola2(p12,p3,tt); #local p0123 = interpola2(p012,p123,tt); p0123 #end #macro curva(p0, p1, p2, p3, N) #declare nn = 0; union{ #while(nn < N) object{ bola(0.4*(N - nn)/N) translate interpola4(p0, p1, p2, p3, nn/N) texture{tx_azul} } #declare nn = nn + 1; #end } #end #macro polvo( ) #if(clock < 0.5) #local A = <0,0,0>; #local B = <3,1*clock*clock,2*clock>; #local C = <1.5,1.0*clock,2.5*clock>; #local D = <2.5,2*clock*clock*clock,3*clock*clock*clock>; #else #local A = <0,0,0>; #local B = <3,1*(1-clock)*(1-clock),2*(1-clock)>; #local C = <1.5,1.0*(1-clock),2.5*(1-clock)>; #local D = <2.5,2*(1-clock)*(1-clock),3*(1-clock)*(1-clock)*(1-clock)>; #end object { curva( A, B, C, D ,100 ) translate <0.5,0,0>} object { curva( A, -B, C, -D ,100 ) translate <-0.5,0,0>} object { curva( A, B, C, D ,100 ) rotate <-45,45,45> } object { cabeca translate< 0, 0, 0.5 > texture{ tx_azul } } #end #include "eixos.inc" union{ object{ eixos(3.00) } polvo() } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 6.0; #declare dir_camera = < 14.00, 40.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)