loops

I have been thinking about doing Bridget Riley-ish optical art with processing started with a line loop

int y = 0;
int x = 0;

void setup() {
size(1000,1000);
background(255);
frameRate(100);
}

void draw() {
// Draw a line
strokeWeight(5);
stroke(0);
// draw line
line(0,y,width,y);
// Increment y
y += 10;
strokeWeight(5);
stroke(255);
// Only one line is drawn each time through draw().
line(x,0,x,height);
// Increment x
x += 10;
// Reset x back to 0 when it gets to the side of window
if (y > height) {
y = 0;
}
if (x > width) {
x = 0;
}
}