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)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.