// Last edited on DATE TIME by USER // Processed by remove-cam-lights background{ color rgb < 1.00, 1.00, 1.00 > } #declare valores = array[7]; #declare valores[0] = (1-clock)*1 + clock * 2; #declare valores[1] = (1-clock)*2 + clock * 3; #declare valores[2] = (1-clock)*6 + clock * 5; #declare valores[3] = (1-clock)*7 + clock * 6; #declare tx_xadrez = texture{ pigment{ checker color rgb <0, 0, 0 >, color rgb < 1, 1, 1 > } finish{ diffuse 0.9 ambient 0.1 } scale 2.0 } #macro bit(valor,defeito) #if(defeito = 0) union{ object { box{ <-0.1,-0.5,0>, <0.1,0.5,1> pigment { rgb < 1, 0, 0> }} } #local angulo = 150 -(120*valor); object { box { <-0.05,-0.1,0>, <0.05,0.1,0.5> pigment {rgb <0,1,0>}} rotate <0,angulo*1,0> translate <0.1,0,0.4> } } #else object { box{ <-0.1,-0.5,0>, <0.1,0.5,1> pigment { rgb < 0, 0, 1> }} } #end #end #declare roleta=seed(437); #macro fileira(quantidade, valor,prob) #local j = int(valor); #local f = valor - j; #local k = 0; union{ #while(k < quantidade) #local defeito = (rand(roleta) <= prob); #local resto = mod(j,2); #if (resto=0) object {bit(f,defeito) translate<0,k*-1.5,0 >} #local f = 0; #else object {bit(1-f,defeito) translate<0,k*-1.5,0 >} #end #local j = int(j/2); #local k = k + 1; #end } #end #macro abaco(fileiras,bits,vals,prob) #local k = fileiras; #local i = bits; #local j = vals; union{ box{ <-0.05,-0.5,0>, <0.05,0.5*bits*-3.25,1* -fileiras *1.25> translate <0,1.3,0>} #while(k > 0) object{ fileira(i,j[k-1],prob) translate <0,0, k * -1.2> } #local k = k-1; #end } #end #include "eixos.inc" union{ object{ eixos(3.00) } object{ abaco(4,4,valores,0.05) translate <0,0,2.5>} object{ box{ <-2,-20,-20>, <0,+20,+20> } translate < 0,0,-5 > texture{ tx_xadrez } } } #include "camlight.inc" #declare centro_cena = < 0.00, -2, 0 >; #declare raio_cena = (1-clock) * 10 + clock *5; #declare dir_camera = <15, 0, 0>; #declare dist_camera = 8.0; #declare intens_luz = 0.80; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)