Random Line Maker

the code


// Random Line Maker
// I wanted to connect the lines, but I will come back to that idea

// declare variables
//colors
float r;
float g;
float b;
float a;

//construction
float startX = width/2;
float startY = height;
float endX;
float endY;

void setup() {
size(400,400);
background(255);
smooth();
}
void draw() {
// pick a random color
r = random(255);
g = random(255);
b = random(255);
a = random(255);

startX = random(width);
startY = random(height);
endX = random(width);
endY = random(height);

// create a random colored line of random dimensions
stroke(r,g,b,a);
line(startX,startY,endX,endY);

}

// if the mouse is pressed, redraw the background
void mousePressed() {
background(255);
}