ball leaves path when it bounces around

So I have a short physics thing with a ball that bounces around but it leaves a weird path of the past places it had been. Here it is. Tell me what I did wrong

function setup()

background(0, 0, 0, 255)
strokeWidth(2)
stroke(255, 255, 255, 255)
noFill()
top = physics.body(EDGE, vec2(0, HEIGHT), vec2(WIDTH, HEIGHT))
left = physics.body(EDGE, vec2(0, 0), vec2(0, HEIGHT))
right = physics.body(EDGE, vec2(WIDTH, 0), vec2(WIDTH, HEIGHT))
bottom = physics.body(EDGE, vec2(0, 0), vec2(WIDTH, 0))

ball = physics.body(CIRCLE, 10)
ball.position = vec2(WIDTH/2, HEIGHT/2)
ball.linearVelocity = vec2(200, 200)
ball.restitution = 1.1
ball.friction = 0
ball.type = DYNAMIC
ball.gravityScale = 3
end 
function draw()
    ellipse(ball.x, ball.y, 20)
end

The command “background” should be in draw, not in setup.

The problem is you aren’t clearing the screen each time you draw. That’s what background is for.

@Ignatz Thanks!