from math import * from kandinsky import * N = 32 a = [i * 2 * pi / N for i in range(N)] def T(u, a1, a2, b1, b2): return (b2 - b1) / (a2 - a1) * (u - a1) + b1 def f(x, y, v): return sin(x * cos(v) + y * sin(v)) >= y * cos(v) - x * sin(v) for c in range(320): x = T(c, 0, 320, -2, 10) for l in range(222): y = T(l, 0, 222, -10, -0.7) for v in a: if f(x, y , v) and not(f(x, y, v - pi / N)): set_pixel(c, 221 - l, (0, 0, 0))