bin2.py

Created by schraf

Created on May 11, 2024

461 Bytes


from kandinsky import *
from math import *

t = 1
w, h = 160 //t, 111 // t + 1

def f1(c,l): return c**2 + l**2
def f2(c,l): return c*l
def f3(c,l): return sqrt(abs(c*l))
def f4(c,l): return 16 *cos(c*l)
def f5(c,l): return c*c-l*l
def f6(c,l): return 100*c*c / (l*l + 1)
def f7(c,l): return c ^ l

for c in range(-w,w):
 for l in range(-h,h):
  y = int(f7(c,l))
  fill_rect((w+c)*t,(h+l)*t,t,t,(255 - 255 * (bin(y)[2:].count("1") % 2),) * 3)