// Last edited on 2013-12-11 09:19:57 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 chao = box{ <-20,-20,-1>, <+20,+20,0> } #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 #declare ptent1 = array[4] {<0,0,0>,<1,1,1>,<2,2,-1>,<3,3,0.5>} #declare t1c1 = array[3] {<0.5,0.5,0>,<1,1,0.5>,<1.5,1.5,0.5>} #declare t1c2 = array[3] {<2.5,2.5,-0.5>,<3,3,-0.5>,<3.5,3.5,0>} #declare t2c1 = array[3] {<-0.5,0.5,0>,<-1,1,0.5>,<-2,2,0.5>} #declare t2c2 = array[3] {<-2.5,2.5,-0.5>,<-3,3,-0.5>,<-3.5,3.5,0.5>} #declare t3c1 = array[3] {<-0.5,-0.5,0>,<-0.5,-0.5,0.5>,<-1,-1,0.5>} #declare t3c2 = array[3] {<-2.5,-2.5,-0.5>,<-3,-3,-0.5>,<-3.5,-3.5,0>} #macro curva_raio(P0,P1,P2,P3,R0,R1,R2,R3,N) union { #local i = 0; #while (i <= N ) #local centro = interpola4(P0,P1,P2,P3, i/N); #local raio = interpola4(R0,R1,R2,R3,i/N); object { sphere { centro, raio} texture {tx_plastico }} #local i = i + 1; #end } #end #macro curva(P0,P1,P2,P3,N) union { #local i = 0; #while (i <= N ) object { sphere { interpola4(P0,P1,P2,P3, i/N), 0.02} texture {tx_plastico }} #local i = i + 1; #end } #end #macro tentaculo(P0,P1,P2,Q0,Q1,Q2,N) #local PM = (P2+Q0)/2; union { curva_raio(P0,P1,P2,PM,0.3,0.2,0.1,0.05,N) curva_raio(PM,Q0,Q1,Q2,0.05,0.04,0.03,0.01,N) } #end #include "eixos.inc" union{ object{ eixos(3.00) } object{ chao translate < 0,0,-5 > texture{ tx_xadrez } } tentaculo(t1c1[0],t1c1[1],t1c1[2],t1c2[0],t1c2[1],t1c2[2],100) tentaculo(t2c1[0],t2c1[1],t2c1[2],t2c2[0],t2c2[1],t2c2[2],100) tentaculo(t3c1[0],t3c1[1],t3c1[2],t3c2[0],t3c2[1],t3c2[2],100) } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 6.0; #declare dir_camera = < 14.00, 7.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)