Psychedelic painting

def setup():
size (500, 500)

global x, y, xSpeed, ySpeed, diam, diamSize
x=0
y=0
xSpeed = 5
ySpeed = 5
diamSize=0.5
diam= 2


def draw ():
global x, y, xSpeed, ySpeed, diam, diamSize
fill (0)
noStroke()
# every time we draw loop iterates we want to add the value of Speed.

x= x + xSpeed
y= y + 0.2*ySpeed
diam= diam + diamSize


ellipse(x,y,diam,diam)

if x >= width or x < 0 :
xSpeed= -(xSpeed)
diamSize= -(diamSize)

if y >= height:
ySpeed=2
ySpeed= -(ySpeed)

if y < 0:
ySpeed= -(ySpeed)

if xSpeed <0:
fill(284,31,86)
ellipse(x,y,diam,diam)

if ySpeed <0 and xSpeed <0:
fill(102,102,255)
ellipse(x,y,diam,diam)
One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.