from math import * from kandinsky import * from time import * from random import random BL,GR = (30,)*3, (90,250,0) ms = .04 fill_rect(0, 0, 320, 222, BL) d = "@%#*+=-:. .:-=+*#%@" def f(t, i, x, y): return .02/sin(3**(x+1)-atan2(x+1,(x+1)*y)*3-t) def carre(x, y, v): g, h = 12 * x, 13 * y coul = d[v] draw_string(coul, g , h , GR, BL) def tixy(): t = 0 while True: for i in range(490): x, y = i % 27, i // 27 v = int((18 + 18 * min(1, max(-1, f(t , i, x, y))))/2) carre(x, y, v) sleep(ms) t += ms/2 + random()/100 tixy()