# Abreviated version from https://github.com/villares
#トゥートProcessing #py5
from collections import deque
history = deque(maxlen=512)
def setup():
size(600, 400)
no_stroke()
color_mode(HSB)
def draw():
background(51)
for i, (x, y) in enumerate(history):
fill(i / 2, 255, 255, 128)
circle(x, y, 8 + i / 16)
if history:
history.append(history.popleft())
def mouse_dragged():
history.append((mouse_x, mouse_y))
def key_pressed():
history.clear()