pattern.py

Created by hawkinja

Created on April 20, 2018

436 Bytes

Just draws pretty patterns using the kandinsky module. The pattern changes by adjusting the “max” values.


from math import *
import kandinsky as k

x=0
y=0
a=0
b=0
c=0
t=0
#full screen 319
xmax=330
#full screen 221
ymax=221
tmax=35001
cmax=31
#T max
while t < tmax:
  t=t+1
#X max - full screen 319
  if x == xmax:
    a=1
  if x == 0:
    a=0
#Y max - full screen 221
  if y == ymax:
    b=1
  if y == 0:
    b=0
  if a == 0:
    x=x+1
  else:
    x=x-1
  if b == 0:
    y=y+1
  else:
    y=y-1
  c=c+cmax
  k.set_pixel(x,y,c)