async function setup() { createCanvas(1000, 1000, WEBGL); randomSeed(93619); noiseSeed(93619); if (typeof brush !== "undefined" && brush.scaleBrushes) { brush.scaleBrushes(1); } noLoop(); } function draw() { translate(-width / 2, -height / 2); background(250, 244, 232); try { // background wash - warm luminous field brush.set("marker", color(255, 210, 150), 1); for (let i = 0; i < 40; i++) { let x = random(1000), y = random(1000); brush.fill(color(255, 190 + random(40), 120 + random(60)), 20); brush.circle(x, y, random(80, 220), 0.6); } brush.set("marker", color(200, 230, 200), 1); for (let i = 0; i < 20; i++) { let x = random(1000), y = random(1000); brush.fill(color(180, 220, 190), 14); brush.circle(x, y, random(100, 260), 0.7); } // deep green leaf shapes behind flower brush.set("charcoal", color(40, 80, 40), 2); brush.fill(color(30, 90, 45), 90); brush.circle(230, 760, 220, 0.8); brush.fill(color(20, 70, 35), 70); brush.circle(760, 200, 180, 0.9); brush.fill(color(25, 100, 50), 60); brush.circle(820, 780, 200, 0.7); // stem brush.set("2B", color(50, 90, 40), 4); brush.line(500, 950, 520, 620); brush.line(520, 620, 470, 500); push(); translate(520, 430); // hibiscus petals - 5 large layered petals radiating let petalColors = [ color(230, 30, 70), color(240, 60, 90), color(210, 20, 60), color(250, 90, 110), color(200, 10, 50) ]; for (let p = 0; p < 5; p++) { let ang = p * TWO_PI / 5 - HALF_PI; push(); rotate(ang); brush.set("2B", petalColors[p], 3); brush.fill(petalColors[p], 150); brush.fillBleed(1.2, "out"); // petal shape via layered circles forming teardrop for (let k = 0; k < 6; k++) { let t = k / 5; let px = lerp(0, 0, t); let py = lerp(20, 230, t); let r = lerp(60, 20, t) * (1 - t * 0.2); brush.fill(lerpColor(petalColors[p], color(255, 220, 230), t * 0.5), 90 - t * 30); brush.circle(px + sin(t * PI) * 40, py, r, 0.5); } // petal edge stroke brush.set("rotring", color(150, 0, 40), 2); brush.line(-30, 30, 0, 220); brush.line(30, 30, 0, 220); pop(); } // inner throat - deep magenta core brush.set("2B", color(120, 0, 30), 2); brush.fill(color(140, 0, 40), 200); brush.circle(0, 0, 55, 0.4); brush.fill(color(90, 0, 20), 180); brush.circle(0, 0, 25, 0.5); // stamen - long protruding pistil, iconic hibiscus feature brush.set("pen", color(200, 40, 90), 2); brush.line(0, 0, 10, -260); brush.set("HB", color(255, 210, 60), 3); for (let i = 0; i < 8; i++) { let yy = -220 - random(40); let xx = 10 + random(-15, 15); brush.fill(color(255, 220, 80), 210); brush.circle(xx, yy, 9, 0.6); } brush.fill(color(255, 80, 60), 220); brush.circle(10, -260, 12, 0.4); pop(); // scattered droplets / texture marks for watercolor life brush.set("HB", color(255, 255, 255), 1); for (let i = 0; i < 60; i++) { let x = random(1000), y = random(1000); brush.fill(color(255, 255, 255), 12); brush.circle(x, y, random(2, 8), 0.9); } // dark accents grounding composition, splatter charcoal brush.set("charcoal", color(30, 20, 20), 1); for (let i = 0; i < 25; i++) { let x = random(1000), y = random(1000); brush.fill(color(20, 15, 15), 18); brush.circle(x, y, random(3, 14), 1.0); } } catch (e) { // fail-safe: ensure canvas remains visible even if a brush call errors } }