from math import floor,sin from kandinsky import fill_rect def fract(x): return x - floor(x) def hash_float(n): return fract(sin(n) * 10000) def smoothstep(t): return t * t * (3 - 2 * t) def noise(x): i = floor(x) f = x - i a = hash_float(i) b = hash_float(i + 1) t = smoothstep(f) return a * (1 - t) + b * t for i in range(320): fill_rect(i,222-int(noise(i)*222),1,1,(0,)*3)