int mypoint = 1; void setup() { size(200,200); background(128); // speed it up framerate(30); } void draw() { // redraw the background background(128); mypoint = mypoint + 3; // make it move faster // use an IF statement to keep mypoint from going off the screen if (mypoint >= width) // if it is greater than OR equal to width { mypoint = 0; } // draw a line from the mouse to the point line(mouseX,mouseY,mypoint,mypoint); // draw a line from the 0, 0 point to the bottom right edge line(0,0,width,height); }