![](https://assets.st-note.com/img/1728230908-J6eCGmgrPB5LjN13XdSUtwYo.png?width=1200)
String APPNAME = "generativeart_038";
void setup() {
size(800, 800);
noLoop();
}
void draw() {
background(0, 0, 0);
noFill();
noStroke();
drawpPttern(8);
drawFooter();
}
void drawpPttern(int PIECE_NUMBER){
for(int i = 0; i < PIECE_NUMBER; i = i + 1){
for(int j = 0; j < PIECE_NUMBER; j = j + 1){
float PIECE_WIDTH = width/PIECE_NUMBER;
float PIECE_HEIGHT = height/PIECE_NUMBER;
float PIECE_CORNER_R = 20;
float CORNER_X = PIECE_WIDTH * i;
float CORNER_Y = PIECE_HEIGHT * j;
strokeWeight(0.5);
stroke(64, 64, 64);
fill(255, 255, 255);
rect(CORNER_X, CORNER_Y, PIECE_WIDTH, PIECE_HEIGHT, PIECE_CORNER_R);
fill(64, 64, 64);
noStroke();
float R = 3;
float k = 0;
float PIECE_CENTER_X = CORNER_X + PIECE_WIDTH / 2;
float PIECE_CENTER_Y = CORNER_Y + PIECE_HEIGHT / 2;
while(true){
if(R * 2 < PIECE_WIDTH){
float CIRCUMFRENCE_X = PIECE_CENTER_X + R * cos(radians(k));
float CIRCUMFRENCE_Y = PIECE_CENTER_Y + R * sin(radians(k));
circle(CIRCUMFRENCE_X, CIRCUMFRENCE_Y, 2);
} else {
break;
}
R = R + 0.1;
k = k + 2;
}
noStroke();
fill(255, 255, 255);
circle(CORNER_X, CORNER_Y, 10);
}
}
}
void drawFooter(){
rectMode(CORNER);
noStroke();
fill(255, 255, 255, 192);
rect(0, height - 45, width, 45);
textAlign(LEFT, BOTTOM);
textSize(20);
fill(64);
text(APPNAME, 30, height - 10);
textAlign(RIGHT, BOTTOM);
textSize(20);
fill(64);
text("(C)2024 sakuzo_arts", width - 30, height - 10);
}
void keyPressed(){
if(key == ' '){
redraw();
}
if(key == 'S'){
int Y = year();
int M = month();
int D = day();
int h = hour();
int m = minute();
int s = second();
String FILENAME = APPNAME + "-" + Y + nf(M, 2) + nf(D, 2) + nf(h, 2) + nf(m, 2) + nf(s, 2);
saveFrame(FILENAME + ".png");
}
}