xxxxxxxxxx
int eSize = 20;
size(400,400);
background(255,255,255);
noStroke();
smooth();
for(int y= 0; y<=height; y+=10){ //define y=0
for(int x= 0; x<=width; x+=10){ //define x=0
fill(x/2+y/2,x/2,y/2);
ellipse(x,y,eSize,eSize); //make back
}
}
for(int y = 0; y <= 400; y+=50){ //define y=0
for(int x = 0; x <= 400; x+=50){ //define x=0
if (x < width/2 && y >= height/2) {
stroke(y/2,400-y,x/2); //color serect
}else if (x >= width/2 && y < height) {
stroke(180,400-x,400-y); //color serect
line(x,400-y,400-x,y); //draw line
}
}
}
for(int y= 10; y<=height; y+=20){
for(int x= 10; x<=width; x+=20){
colorMode(RGB,256);
noStroke();
rectMode(CENTER);
fill(200-x,5*y,x*5); //color serect
rect(x*5,y*5,eSize,eSize); //make square
}
}
for(int y=10; y<height; y+=20){
for(int x=10; x<width; x+=20){
ellipseMode(CENTER);
fill(255-x,y*4,x*y);
ellipse(x*5,y*5,eSize,eSize);
}
}