xxxxxxxxxx
int x= 20;
int y=20;
float r;
int f =60;
int sx = 800;
int sy = 600;
void setup(){
size(800, 600);
frameRate(f);
noStroke();
noLoop();
}
void mouseReleased() {
noLoop();
}
void mousePressed() {
loop();
}
void draw(){
background (0);
for(int i=0; i<100; i+=20){
for(int j=0; j<100; j+=20){
r=random(0,1);
if (r<0.5) {
fill(255);
} else {
fill(0);
}
for(int a=0; a < sx+100; a+= 100){
for(int s=0; s < sy+100; s+=100){
rect(i+a,j+s,x,y);
}
}
}
}
}