from random import * from kandinsky import * def mat(n): seed(n) maxi=1 for p in range(32*24): if random()<maxi: draw_string(chr(48+randint(0,9)),10*(p%32), 12*(p//32)) if p%32==0: maxi-=.05 for p in range(320*222): v = get_pixel(p%320,p//320) c = (0,0,0) if v!=(248,252,248): # code du blanc c = choice([(0,0,0),color(16,88,38), color(104, 253, 151)]) set_pixel(p%320,p//320, c) # Version 2 from random import * from kandinsky import * def mat2(n=1): seed(n) co = [(0,0,0),(16,88,38),(104, 253, 151)] fill_rect(0,0,320,222,co[0]) for l in range(12): for c in range(32): if random()<0.3: draw_string(chr(48+randint(0,9)),10*c, 12*l, choice(co[1:]),co[0]) while True: l = randint(0,222) c = randint(0,320) v = get_pixel(c, l) if v != (0,0,0): coul = (v[0]//2, v[1]//2,v[2]//2) set_pixel(c, l, co[0]) set_pixel(c, randint(10,80)+l, coul)