// Exemplo de arquivo de descricao de cena para POV-ray // Last edited on 2010-03-04 15:44:01 by stolfi // ====================================================================== // CORES E TEXTURAS 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_branca = texture{ pigment{ color rgb < 2, 2, 2> } } #declare tx_preta = texture{ pigment{ color rgb < 0, 0, 0> } } #declare tx_madeira = texture{ pigment{ color rgb < 0.80, 0.55, 0.40 > } 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_hyperglass = texture { pigment { color rgb < 0.90 , 0.15 , 0.15 > filter 0.28 } finish { diffuse 0.33 ambient 0.55 } } // ====================================================================== // DESCRIÇÃO DA CENA #declare chao = box { <-40,-40,-1> , <20,20,0> } #include "eixos.inc" #declare pingo_r = 0.1; #declare pingo = sphere { <0,0,0> , pingo_r } // interpola base #macro interpola(f0,v0,f1,v1,f) #local ss = (f-f0)/(f1-f0); #local rr = 1-ss; (rr*v0+ss*v1) #end #macro quatro_graficos(x0,y0,c1y1,c1y2,c2y1,c2y2,c3y1,c3y2,c4y1,c4y2,c4y3,xfim) #local c2y0 = (c2y1+c1y2)/2; #local c1y3=c2y0; #local c3y0 = (c3y1+c2y2)/2; #local c2y3=c3y0; #local c4y0 = (c4y1+c3y2)/2; #local c3y3=c4y0; #local dist = (xfim-x0)/4; union { grafico(x0,y0,c1y1,c1y2,c1y3,x0+dist,nbolinhas) grafico(x0+dist,c2y0,c2y1,c2y2,c2y3,x0+dist*2,nbolinhas) grafico(x0+dist*2,c3y0,c3y1,c3y2,c3y3,x0+dist*3,nbolinhas) grafico(x0+dist*3,c4y0,c4y1,c4y2,c4y3,x0+dist*4,nbolinhas) } #end // novo interpola #macro interpola4(t0,v0,v1,v2,v3,t3,tt) #local v01 = interpola(t0,v0,t3,v1,tt); #local v12 = interpola(t0,v1,t3,v2,tt); #local v23 = interpola(t0,v2,t3,v3,tt); interpola(t0,interpola(t0,v01,t3,v12,tt),t3,interpola(t0,v12,t3,v23,tt),tt); #end #macro grafico(x0,y0,y1,y2,y3,x3,n) #local i = 0; #local delta = (x3-x0)/n; #local xx = x0; union { #while (i < n) #local yy = interpola4(x0,y0,y1,y2,y3,x3,xx); object { pingo translate<0,xx,yy> } #local i = i+1; #local xx = xx + delta; #end } #end #declare nbolinhas = 300; #declare curva = array[10] {1,-3,0,0,0,3,6,-6,0,0} #declare tempo = array[2] {0,16} union { union { eixos(3.00) object { quatro_graficos(tempo[0],curva[0],curva[1],curva[2],curva[3],curva[4],curva[5],curva[6],curva[7],curva[8],curva[9],tempo[1]) texture{ tx_plastico } } } rotate<-2,0,41> translate<0,-8,0> } #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 1.00 >; #declare raio_cena = 10; #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)