// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 0.75, 0.80, 0.85 > } #declare marrom = texture{ pigment{ color rgb < 1, 0.51, 0.23 > } finish{ diffuse 0.9 ambient 0.1 } } #declare verde = texture{ pigment{ color rgb < 0, 1, 0 > } finish{ diffuse 0.9 ambient 0.1 } } #declare solo = texture{ pigment{ color rgb < 0, 0.8, 0 > } 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 2.0 } #declare tx_vidro = texture{ pigment{ color rgb < 0.85, 0.95, 1.00 > filter 1.0 } finish{ diffuse 0.03 reflection 0.25 ambient 0.02 specular 0.25 roughness 0.005 } } #include "eixos.inc" #include "retalho.inc" #declare bola = sphere { < 0, 0, 0 >, 0.1 } #declare bolota = sphere { < 0, 0, 0 >, 0.3 } #declare chao = box{ <-20,-20,-1>, <+20,+20,0> } #macro interpola_4 (t0, v0, v1, v2, v3, t1, tt) #local v01 = interpola(t0, v0, t1, v1, tt); #local v12 = interpola(t0, v1, t1, v2, tt); #local v23 = interpola(t0, v2, t1, v3, tt); #local v02 = interpola(t0, v01, t1, v12, tt); #local v13 = interpola(t0, v12, t1, v23, tt); #local v03 = interpola(t0, v02, t1, v13, tt); v03 #end #macro interpola(f0, v0, f1, v1, f) #local ss = (f - f0)/(f1 - f0); #local rr = 1 - ss; (rr * v0 + ss * v1) #end #macro grafico(x0, y0, y1, y2, y3, x3, N) union { #local inc = (x3 - x0) / N; #local i = 0; #while(i < N) #local xx = x0 + inc * i; #local yy = interpola_4(x0, y0, y1, y2, y3, x3, xx); #local i = i + 1; object { bola translate yy } #if(((xx/9) < clock) & (((xx + 0.05)/9) > clock)) object { bolota translate yy texture { tx_xadrez } } #end #end } #end #local y01a = <1,1,4>; #local y02a = <1,2,4>; #local y03a = <1,3,4>; #local y04a = <1,4,4>; #local y11a = <2,1,4>; #local y12a = <2,2,4>; #local y13a = <2,3,4>; #local y14a = <2,4,4>; #local y21a = <3,1,5>; #local y22a = <3,2,5>; #local y23a = <3,3,5>; #local y24a = <3,4,5>; #local y01b = <5,1,3>; #local y02b = <5,2,4>; #local y03b = <5,3,3>; #local y04b = <5,4,4>; #local y11b = <6,1,2>; #local y12b = <6,2,1>; #local y13b = <6,3,2>; #local y14b = <6,4,1>; #local y21b = <7,1,1>; #local y22b = <7,2,0>; #local y23b = <7,3,1>; #local y24b = <7,4,0>; #local y01 = <5,5,3>; #local y02 = <4,2,3>; #local y11 = <6,3,3>; #local y12 = <5,4,4>; #local y11 = <6,1,2>; #local y21 = <6,2,1>; #local y22 = <4,3,2>; #local y31 = <6,2,5>; #local y32 = <7,4,2>; union { union { object { grafico(1, (y32+y01)/2, y01, y02, (y02+y11)/2, 3, 400) texture{ marrom }} object { grafico(3, (y02+y11)/2, y11, y12, (y12+y21)/2, 5, 400) texture{ verde }} object { grafico(5, (y12+y21)/2, y21, y22, (y22+y31)/2, 7, 400) texture{ marrom }} object { grafico(7, (y22+y31)/2, y31, y32, (y32+y01)/2, 9, 400) texture{ verde }} translate <5, 0, 5> } } #include "camlight.inc" #declare centro_cena = < 5.00, 0.00, 5.00 >; #declare raio_cena = 10.0; #declare dir_camera = < 1, 1, 1>; #declare dist_camera = 80.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)