One Line
I’m aware these could be more interesting; I kind of lost track of time with the other parts of this assignment and this (and the 10 lines one) kind of got the short end of the stick in terms of my attention. But basically the line follows the cursor around, and gets longer and shorter depending where the cursor is located, as well as changes its angle to gravitate toward the top and left depending which one the cursor is closer to.
void setup(){
size(300,300);
background(0);
stroke(255);
strokeWeight(3);
frameRate(15);
}
void draw(){
float x1 = mouseX+mouseX/5;
float y1 = mouseY+mouseY/5;
float x2 = mouseX-mouseX/5;
float y2 = mouseY-mouseY/5;
line(x1,y1, x2,y2);
fill(0,0,0, 10);
rect(0,0, 300,300);
}