int line_down = 5;
void setup(){
size(500, 500);
}
void draw(){
line_down = line_down + 1;
for (int i = 0; i< 500;i+=100){
for (int z = 0; z< 500;z+=100){
strokeWeight(4);
stroke(0,255,0);
line(10+i+line_down, 10+z, 100+i+line_down, 100+z);
line(10+i, 10+z+line_down, 100+i, 100+line_down);
stroke(255,255,0);
line(10+i, 100+z+line_down, 100+i, 10+z+line_down);
line(10+i+line_down, 100+z, 100+i+line_down, 10+z);
}
}
}
void keyPressed(){
if (key == 's'){
save("saveimage.png");
}
}
|