// Last edited on DATE TIME by USER // Processed by remove-cam-lights #include "retalho.inc" 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.90 } 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_vidro1 = texture{ pigment{ color rgb < 0.85, 0.95, 0.80 > filter 0.70 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 } } #declare tx_vidro2 = texture{ pigment{ color rgb < 0.8, 0.8, 0.80 > filter 0.90 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 } } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #macro interpola (t0,v0,t1,v1,tt) #local ss = (tt-t0)/(t1-t0); #local rr = 1-ss; (rr*v0 + ss*v1); #end #macro interpola4 (t0, v0, v1, v2, v3, t3, tt) //tt sera o clock #local v01 = interpola (t0,v0,t3,v1,tt); #local v12 = interpola (t0,v1,t3,v2,tt); #local v23 = interpola (t0,v2,t3,v3,tt); #local v012 = interpola (t0,v01,t3,v12,tt); #local v123 = interpola (t0,v12,t3,v23,tt); interpola (t0,v012,t3,v123,tt) #end #macro grafico(x0,y0,y1,y2,y3,x3,N) union { #local i = 0; #local xx = x0; #local delta = (x3 - x0)/N; #while (i < N) #local yy = interpola4(x0,y0,y1,y2,y3,x3,xx); object { sphere {yy, 0.03 } } #local xx = xx + delta; #local i = i+1; #end } #end #macro grafico4 ( x00,y00,y10,y20,y30,x30, x01,y01,y11,y21,y31,x31, x02,y02,y12,y22,y32,x32, x03,y03,y13,y23,y33,x33, N) union { grafico(x00,y00,y10,y20,y30+y01/2,x30,N) grafico(x01,y30+y01/2,y11,y21,y31+y02/2,x31,N) grafico(x02,y31+y02/2,y12,y22,y32+y03/2,x32,N) grafico(x03,y32+y03/2,y13,y23,y33,x33,N) } #end #macro juncao( p11,p12,p13,p14, p21,p22,p23,p24, p31,p32,p33,p34, p41,p42,p43,p44, a11,a12,a13,a14, a21,a22,a23,a24, a31,a32,a33,a34, a41,a42,a43,a44, rad,txg,txr) union{ retalho ( p11*clock,p12*clock,p13*clock,(p14+a11)/2, p21,p22,p23,(p24+a21)/2, p31,p32,p33,(p34+a31)/2, p41,p42,p43,(p44+a41)/2, rad, txg, txr) retalho( (p14+a11)/2,a12,a13,a14, (p24+a21)/2,a22,a23,a24, (p34+a31)/2,a32,a33,a34, (p44+a41)/2,a42,a43,a44, rad, txg, txr ) } #end #declare raio = 2.000; #include "eixos.inc" object{ eixos(3.00) } juncao ( <0,0,-1>, <.8,0,3>, <1.5,-0.1,0.1>, <2,0.1,-3>, <0,.3,-1>, <.8,.4,4>, <1.5,0.5,0.1>, <2,0.4,-3>, <0,.5,-1>, <.8,.7,3>, <1.5,0.9,0.1>, <2,0.6,-3.3>, <0,.8,-1>, <1,.8,3>, <1.5,1.1,0.1>, <2,0.9,-2.3>, <1,0,0>, <1.8,0,0>, <2.5,-0.1,0.1>, <3,0.1,0.3>, <1,.3,0>, <1.8,.4,0>, <2.5,0.5,0.1>, <3,0.4,0.3>, <1,.5,0>, <1.8,.7,0>, <2.5,0.9,0.1>, <3,0.6,0.3>, <1,.8,0>, <2,.8,0>, <2.5,1.1,0.1>, <3,0.9,0.3>, 0.003, tx_plastico, tx_fosca) #include "camlight.inc" #declare centro_cena = < 0.00, 0.00, 0.00 >; #declare raio_cena = 7.0; #declare dir_camera = < 1.00, 1.00, 1.00 >; #declare dist_camera = 5.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)