from math import cos, sin, pi, sqrt, acos import kandinsky kandinsky.fill_rect(0, 0, 320, 222, (255, 0, 0)) M, P = 313, 60 i, j, step = 0.0, 1, 0.00055 while i <= 1.57: j = -j x = int(P * (j * i + 2.7)) y = int(175 - P * (2 + (i ** 0.01) * (abs(cos(i)) ** 0.5 * cos(M * i)) - i ** 0.3)) kandinsky.set_pixel(x, 200 - y, (255, 255, 255)) i += step