float x; float vx; void setup(){ background (80); x=50; vx= 0.2; smooth(); stroke (0,255,240); fill(0,255,240); ellipse (50,50,5,5); strokeWeight (5); line (20,15,20,85); line (80,15,80,85); } void draw(){ x=x+vx; if ((x > 78) || (x < 22)) { vx=vx*-1; } ellipse (x,50,1,1); }