createCanvas(1240, 1748);
colors = ["#32312E", "#C7AE82", "#F5F2E3", "#795330", "#4D4940", "#E2DDCB", "#A37D52", "#B9371A", "#77A8B5", "#3D5A8C", "#0D0806", "#DFB23D", "#512E14", "#4E4D4D", "#231C14"];
let nColors = floor(random(5, 10));
for (let i = 0; i < colors.length - nColors; i++) {
colors.splice(random(colors.length), 1);
background(random(["#F5F2E3", "#E2DDCB", "#EDD99F", "#C7AE82"]));
if (frameCount > maxFrames) {
let w = random(width/4, 3 * width/4);
let h = random(height/4, 3 * height/4);
let x0 = random(-width/6, width - w + width/6);
let y0 = random(-height/6, height - h + height/6);
translate(x0 + w/2, y0 + h/2);
for (let i = 0; i < n; i++) {
points.push(createVector(random(-w/2, w/2), random(-h/2, h/2)));
for (let i = 0; i < n; i++) {
strokeWeight(random(1.5));
let nzx = noise(p.x, p.y, frameCount + i/20);
let nzy = noise(p.x, p.y, frameCount + i/20 + 1);
curveVertex(p.x + (nzx - 1/2)*10, p.y + (nzy - 1/2)*10);
let size = randomGaussian(2, 2);
let xCenter = random(width);
let yCenter = random(height);
let maxNoise = randomGaussian(2, 3);
let angleStep = TWO_PI / floor(random(5, 10));
for (let theta = 0; theta <= TWO_PI + 3 * angleStep; theta += angleStep) {
let r = size + noise(r1*2, r2*2, frameCount) * maxNoise;
let x = xCenter + r * cos(theta);
let y = yCenter + r * sin(theta);
if (key === "s" || key === "S") {
saveCanvas("PollokNumber31_1240x1748", "jpeg");