int i; size(300,300); for(i = 0; i < 300; i+=3){ stroke(i,0,0); line(300,300,0,0); line(0,0,300,i); line(300,300,0,0); line(300,0,0,i); }