void setup() {
size(512, 512);
colorMode(HSB, 360, 100, 100);
noLoop();
}
void draw() {
PGraphics g = createGraphics(512, 512, JAVA2D);
g.beginDraw();
g.noStroke();
g.background(255, 255, 255, 0);
g.rectMode(CENTER);
g.fill(270, 100, 100, 10);
int centerW = g.width / 2;
int centerH = g.height / 2;
float size = sqrt(2) * 512 / 2;
for (int i = 0; i < 360; i += 10) {
g.translate(centerW, centerH);
g.rotate(radians(i));
g.translate(-centerW, -centerH);
g.rect(centerW, centerH, size, size);
g.translate(centerW, centerH);
g.rotate(radians(-i));
g.translate(-centerW, -centerH);
}
g.endDraw();
image(g, 0, 0);
g.save("circle.png");
}