let pallete = ["#302933", "#A97F8D", "#CFB2AA", "#6746A6", "#FC4C33", "#D3CCE9"];
graphics = createGraphics(width, height);
graphics.colorMode(HSB, 360, 100, 100, 100);
for (let i = 0; i < width * height * 15 / 100; i++) {
random(100) > 50 ? graphics.fill(0, 0, 100, 5) : graphics.fill(0, 0, 0, 5);
graphics.ellipse(x, y, w, h);
colors = pallete.concat();
let bgNum = int(random(colors.length));
cells = int(random(3, 8));
d = (width - offset * 2 - margin * (cells - 1)) / cells;
for (let j = 0; j < cells; j++) {
for (let i = 0; i < cells; i++) {
let x = offset + i * (d + margin);
let y = offset + j * (d + margin);
lineArc(x, y, x + d, y + d);
lineArc(x, y, x + d, y + d);
lineArc(x + d, y, x, y + d);
lineArc(x + d, y, x, y + d);
function lineArc(x1, y1, x2, y2) {
let d = dist(x1, y1, x2, y2);
let angle = atan2(y2 - y1, x2 - x1);
let ddPlus = d / int(random(3, 20));
if (dd + ddPlus > d) ddPlus = d - dd;
let ax = dd + ddPlus / 2;
let isFill = random(100) > 50 ? true : false;
arc(ax, 0, ddPlus, ddPlus, 0, 180);
arc(ax, 0, ddPlus, ddPlus, 0 + 180, 180 + 180);