void setup() { size(550,550); // set screen size. background(255); // set background color. fill(0); // I want to fill objects with black. noStroke(); // objects with no outlines. } // declare and initialize variables. int xspeed=1, yspeed=3; int x=0, y=0; void draw() { x = x + xspeed; y = y + yspeed; // screen boundary check if( (x < 0) || (x > 550) ) xspeed = -xspeed; if( (y < 0) || (y > 550)) yspeed = -yspeed; //background(255); //rect(x,y,10,10); ellipse(x,y,5,5); ellipse(y,x,5,5); }