from kandinsky import fill_rect from time import sleep M = [('3F3F1B0E24311B3F3F2A2A0000111B201B110000152A',6,2,(90,140,190),(0,3,24)), ('FFFCCC666000FFF0004010200A80701DC0700A8020401000FFF000555000FFFAAA555000000AAA000',12,3,(216,216,216),(215,16,13)), ('0821C73C73C73833012000440EE0FE0FE07C038010',10,3,(240,140,190),(223,18,124)), ('5EFAC6501E82E44428010428E44E82501AC6',12,3,(66,82,97),(218,189,123)), ('C8268C630EE10EE0F6DE7ABC3C7801013C787ABCF6DE0EE00EE18C63C826',16,4,(250,250,250),(8,123,195))] T = 4 def pull(m): col = 1 + 320 // (m[1] * T) lig = len(m[0]) // m[2] pas = m[2] coul = m[4] fill_rect(0,0,320,222,m[3]) for v in range(1 + 222 // (lig * T)): for c in range(col): for l in range(lig): h = int(m[0][pas * l: pas * l + pas], 16) for j in range(m[1]): if h >> j & 1: fill_rect(m[1] * T * (c % col) + T * j, T * v * lig + T * l, T, T, coul) i = 0 while True: i = (i + 1) % 5 pull(M[i]) sleep(1)