// Last edited on DATE TIME by USER // Processed by remove-cam-lights #include "eixos.inc" #include "textures.inc" #declare valores = array[10]; #declare valores[0] = (1-clock)*0 + clock*1; #declare valores[1] = (1-clock)*1 + clock*5; #declare valores[2] = (1-clock)*0 + clock*3; #declare valores[3] = (1-clock)*3 + clock*7; #declare valores[4] = (1-clock)*0 + clock*9; #declare valores[5] = (1-clock)*5 + clock*12; #declare valores[6] = (1-clock)*0 + clock*13; #declare valores[7] = (1-clock)*6 + clock*12; #declare valores[8] = (1-clock)*1 + clock*5; #declare valores[9] = (1-clock)*0 + clock*5; #declare roleta = seed(417); #include "camlight.inc" #declare centro_cena = < 0.00, 4.00, 8.00 >; #declare raio_cena = 15.0; #declare dir_camera = <(1-clock)*15 + clock*25,(1-clock)*-40 + clock*40,0>; #declare dist_camera = 25; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena,dir_camera,dist_camera , z, intens_luz) 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 tx_red = texture{ pigment{ color rgb <1, 0, 0 >} finish{ diffuse 0.9 ambient 0.1 } } #declare tx_green = texture{ pigment{ color rgb <0, 1, 0>} finish{ diffuse 0.9 ambient 0.1 } } #declare tx_blue = texture{ pigment{ color rgb <0, 0, 1>} finish{ diffuse 0.9 ambient 0.1 } } #declare tx_marrom = texture{ pigment{ color rgb <0.8,0.6,0.3>} } #macro bit(pos,defeito) #if(defeito = 0) #if(pos=0) union{ cylinder{<0,0,0> <0,0,1> 0.15 texture{Tan_Wood}} sphere{<0,0,0.25> 0.2 texture{White_Marble}} } #else union{ cylinder{<0,0,0> <0,0,1> 0.15 texture{Tan_Wood}} sphere{<0,0,0.75*pos + 0.125> 0.2 texture{White_Marble}} } #end #else union{ cylinder{<0,0,0> <0,0,1> 0.15 texture{Tan_Wood}} } #end #end #macro fileira(n,valor,prob) union{ #local aux = int(valor); #local f = valor - aux; #local i = n; #while(i > 0) #local res = mod(aux,2); #local aux = int(aux/2); #local def = (rand(roleta) < prob); #if(res = 0) #local bitr = f; #local f = 0; #else #local bitr = 1-f; #end object{bit(bitr,def) translate<0,i*0.5,0>} #local i = i - 1; #end difference{ box {<-0.25, 0, -0.25> <0.25,(n+1)*0.5, 1.25> texture{Dark_Wood}} box {<-0.5, 0.25, 0> <0.5,((n+1)*0.5)-0.25, 1> texture{Dark_Wood}} } } #end #macro abaco(m,n,valores,prob) union { #local i = m; #while(i > 0) object{fileira(n,valores[i-1],prob) translate<-0.09,0,i*1.2>} #local i = i - 1; #end } #end union{ object{abaco(10,5,valores,0.1)} }