// Last edited on DATE TIME by USER // Processed by remove-cam-lights #declare roleta = seed(765); #declare probability = 0.1; //10% of chance of error 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 valores = array[5] { 0, 1, 2, 3, 4} #declare valores[0]=(1-clock/2)*valores[0] + (clock/2)*31; #declare valores[1]=(1-clock/2)*valores[1] + (clock/2)*31; #declare valores[2]=(1-clock/2)*valores[2] + (clock/2)*31; #declare valores[3]=(1-clock/2)*valores[3] + (clock/2)*31; #declare valores[4]=(1-clock/2)*valores[4] + (clock/2)*31; #declare valores2 = array[15] { 15, 9, 17, 3, 0, 10, 1, 0, 1111, 7, 10, 11, 11, 0, 100} #declare argola = union { difference { union { torus {0.2, 0.2} scale <2, 0, 2> } cylinder{ <0,-1,0>, <0,1,0>, 0.7} } scale<0.5, 0.8, 0.5> texture {tx_fosca} } #macro bit(b, defeito) #local b = (b*2)-1; #local c = 1-(b*b); union { difference{ cylinder { <0,-1,-0.7>, <0,1,0.7>, 0.1} box{ <-0.2,0,-1>, <0.2,2,1>} box{ <-0.2,-0.8,-1>, <0.2,-1.6,1>} } difference{ cylinder { <0,-1,-0.7>, <0,1,0.7>, 0.1} box{ <-0.2,0,-1>, <0.2,2,1>} box{ <-0.2,-0.8,-1>, <0.2,-1.6,1>} scale -1*y } box {<-0.15,0.8,-1>, <0.15,1,0.5>} #if(defeito=0) union { argola translate <0, b*-0.65, c*0.4-0.55> } #else #end } #end #macro fileira(n, valor, prob) union { #local i=0; #local r = int(valor); #local f = valor - r; #while(i } #local i=i+1; #end } #end #macro abaco(m, n, valores) union { #local j = 0; #while(j } #local j = j+1; #end box {<-0.2, 1, 0.5>,<0.2,-1.8*n+1,0.7>} box {<-0.2, 1, -0.8*m>,<0.2,-1.8*n+1,-0.8*m-0.2>} box {<-0.2, -n*1.8+1, 0.5> <0.2, -n*1.8+0.8, -m*0.8>} } #end #declare chao = box{ <-20,-20,-11>, <+20,+20,-1> } #include "eixos.inc" union{ object{ chao translate < 0,0,-5 > texture{ tx_xadrez }} union { abaco(5,5,valores) translate 3.1*x } texture{ tx_plastico } } #include "camlight.inc" #declare centro_cena = < 0.00, -5.00, 1.00 >; #declare raio_cena = 12.0; #declare dir_camera = < 1*(clock-1)/clock, 1*(clock+1)/clock, 0.2 >; #declare dist_camera = 25.0; #declare intens_luz = 1.00; camlight(centro_cena, raio_cena, dir_camera, dist_camera , z, intens_luz)