from kandinsky import * from math import sin, cos, pi from random import randint COUL = [(37, 101, 174),(60, 153, 220),(102, 211, 250),(213, 243, 254)] fill_rect(0,0,320,222,COUL[0]) A = pi * .3 # Testez autres valeurs que .3 C,S = cos(A), sin(A) for i in range(100): rvb = COUL[randint(1,3)] r = 8 * randint(0, 355)/1e3 phi = 2 * pi * randint(0, 1000)/1e3 x = r * cos(phi) y = r * sin(phi) for j in range(1000): xn = C * x - S * y - S * sin(x) yn = S * x + C * y + C * sin(x) x, y = xn, yn set_pixel(int(160 + 320 * x / 10),int(110 + 256 * y / 10),rvb)