threesome.py

Created by schraf

Created on August 28, 2022

349 Bytes

Source : http://www.peda.com/grafeq/gallery.html

Chrome : https://my.numworks.com/python/schraf/chrome

Sphère : https://my.numworks.com/python/schraf/sphere

Margarita : https://my.numworks.com/python/schraf/margarita

The Big Swim : https://my.numworks.com/python/schraf/bigswim

Arachnid : https://my.numworks.com/python/schraf/arachnid


from math import *
from kandinsky import *

for c in range(320):
 for l in range(222):
  x=(c-160.01)/15
  y=(l-111.01)/15
  v = sin(sqrt((x+5)**2+y*y))*cos(8*atan(y/(x+5)))*sin(sqrt((x-5)**2+(y-5)**2))
  v *= cos(8*atan((y-5)/(x-5)))*sin(sqrt(x*x+(y+5)**2))*cos(8*atan((y+5)/x))
  if -.1<=v<= 0 or v>=.2: set_pixel(c,222-l,(0,0,0))