let gridSize = width / num;
let maxCircleSize = gridSize * 0.8;
for (let row = 0; row < num; row++) {
for (let col = 0; col < num; col++) {
rect(x, y, gridSize, gridSize);
translate(x + gridSize / 2, y + gridSize / 2);
if ((col == 4 && row == 5) || (col == 8 && row == 9) || (col == 11 && row == 2)) {
drawBlackCircle(maxCircleSize);
} else if (random() < 0.9) {
drawColoredCircle(maxCircleSize);
drawBeigeCircle(maxCircleSize);
translate(width / 2, 50);
text('Design 19', 0, 550);
translate(width / 2, 50);
text('MATSUYA GINZA', -250, 540);
function drawColoredCircle(maxSize) {
let randomColor = int(random(7));
stroke(random(0, 30), random(0, 80), random(80, 180), random(150, 255));
stroke(random(80, 130), random(80, 130), random(80, 130), random(150, 255));
let circleSize = random(10, maxSize);
let offset = (maxSize - circleSize) / 2;
ellipse(0, 0, circleSize, circleSize);
ellipse(0, 0, circleSize - offset, circleSize - offset);
function drawBeigeCircle(maxSize) {
let circleSize = random(10, maxSize);
let offset = (maxSize - circleSize) / 2;
ellipse(0, 0, circleSize, circleSize);
ellipse(0, 0, circleSize - offset, circleSize - offset);
function drawBlackCircle(maxSize) {
let circleSize = random(10, maxSize);
let offset = (maxSize - circleSize) / 2;
ellipse(0, 0, circleSize, circleSize);
ellipse(0, 0, circleSize - offset, circleSize - offset);