xxxxxxxxxx
39
function setup() {
createCanvas(600, 500);
rectMode(CENTER);
// noLoop();
}
function draw() {
background(60);
stroke(0, 200);
holocrux(300, 250, 250, "cyan");
for (let i = 0; i < 2; i++) {
for (let j = 0; j < 2; j++) {
holocrux(100 + i * 400, 100 + j * 300, 80, "tomato");
}
}
holocrux(300, 250, 80, "tomato");
}
function holocrux(x, y, s, c) {
if (s > 2) {
fill(c);
ellipse(x, y, s);
holocrux(x, y - (2 * s) / 3, s / 3, c);
// holocrux(x, y - s / 3, s / 3, c);
holocrux(x, y + (2 * s) / 3, s / 3, c);
// holocrux(x, y + s / 3, s / 3);
holocrux(x - (2 * s) / 3, y, s / 3, c);
// holocrux(x - s / 3, y, s / 3);
holocrux(x + (2 * s) / 3, y, s / 3, c);
// holocrux(x + s / 3, y, s / 3);
}
}