let backColor = ["#e4e9f0", "#F1F1F9"];
let colors1 = ["#D9D6F6", "#AA67B9", "#376AAB"];
let colors2 = ["#D0FF03", "#8C9FC9"];
let colors3 = ["#7b4b94", "#7d82b8", "#b7e3cc", "#c4ffb2", "#d6f7a3"];
let colorArray = [colors1, colors2, colors3];
let cvs = select("#defaultCanvas0");
cvs.style("padding-left", "0");
cvs.style("padding-right", "0");
cvs.style("margin-left", "auto");
cvs.style("margin-right", "auto");
cvs.style("display", "block");
fxSeed = int(fxrand() * 100000000);
colors = random(colorArray);
background(random(backColor));
for (let i = 0; i < width * height / 3; i++) {
let y = randomGaussian(height - height / 10, height / 4);
for (let i = 0; i < int(random(3, 7)); i++) {
let x = random(-10, width + 10);
let y = random(-10, height + 10);
for (let i = 0; i < 7; i++) {
let w = random(width / 5, width / 2);
let cx2 = random(cx - w, cx + w);
let cy2 = random(cy - w, cy + w);
gosen(cx, cy, cx2, cy2, w);
function spiralCircle(cx, cy) {
let radiusNoise = random(10);
let cntMax = random(80, 400);
for (let i = 0; i < cntMax; i += 0.1) {
let thisRad = radius + noise(radiusNoise) * 10;
let c1 = color(random(colors));
let c2 = color(random(colors));
let c1 = color(random(colors));
let c2 = color(random(colors));
let grad = drawingContext.createLinearGradient(0, 0, x[i], y[i]);
grad.addColorStop(0, c1);
grad.addColorStop(1, c2);
drawingContext.shadowColor = color(random(colors));
drawingContext.fillStyle = grad;
function gosen(cx, cy, cx2, cy2, w) {
x2 = random(cx - w, cx + w) - cx;
x3 = random(cx - w, cx + w) + x2 / 2 - cx;
y2 = random(cy - w, cy + w) - cy;
y3 = random(cy - w, cy + w) + y3 / 2 - cy;
let count = random(1, 10);
let num = int(random(3, 8));
for (let i = 0; i < num; i++) {
bezier(x1 + pl, y1 + pl, x2 + pl, y2 + pl, x3 + pl, y3 + pl, x4 + pl, y4 + pl);
if (millis() - lapse > 400){
save("img_" + month() + '-' + day() + '_' + hour() + '-' + minute() + '-' + second() + ".jpg");