float x = 0, y = 0; // The current coordinates of the ball float r = 20; // ball radius float easing = 0.05; // how quickly the ball catches up void setup() { size(400,400); smooth(); noStroke(); } void draw() { background(0); fill(255); ellipse(x,y,2*r,2*r); fill(128); ellipse(mouseX,mouseY,r/2,r/2); // take a step float vx = (mouseX - x) * easing; float vy = (mouseY - y) * easing; x += vx; y += vy; } // START NO NOTES // code used to capture screenshots void keyReleased() { if(key == '`' && !online) save("sketch.png"); }