let seed = Math.random() * 99999;
let colors7 = "fefefe-292929-ffffff-222222-202020".split("-").map((a) => "#" + a);
let colors8 = "f7f6cf-b6d8f2-f4cfdf-9ac8eb-ccd4bf-e7cba9-eebab2-f5f3f7-f5e2e4-f4c815-f9cad7-A57283-c1d5de-deede6-AAD9CD-E8D595-E9BBB5-E7CBA9-8DA47E".split("-").map((a) => "#" + a);
let colors81 = "8c75ff-c553d2-2dfd60-2788f5-23054f-f21252-8834f1-c4dd92-184fd3-f9fee2-2E294E-541388-F1E9DA-FFD400-D90368-e9baaa-ffa07a-164555-ffe1d0-acd9e7-4596c7-6d8370-e45240-21d3a4-3303f9-cd2220-173df6-244ca8-a00360-b31016".split("-").map((a) => "#" + a);
var color_setup1, color_setup2;
mySize = min(windowWidth, windowHeight);
createCanvas(mySize, mySize);
colorMode(HSB, 360, 100, 100, 100);
palette = random(colorScheme).colors.concat();
if (int(seed) % 2 == 0) {
color_setup1 = random(colorScheme).colors.concat();
color_setup2 = random(colorScheme).colors.concat();
color_setup2 = random([colors8, colors81]);
branch = 1 * int(random(10, 20));
drawingContext.shadowColor = str(random(color_setup1)) + "33";
drawingContext.shadowOffsetX = 0;
drawingContext.shadowOffsetY = 0;
drawingContext.shadowBlur = 0;
translate(width / 2, height / 2);
drawingContext.setLineDash([1, 2]);
rotate(random([0, PI / 2, PI, PI * 1.5]));
rotate(angle_c + frameCount / 100);
colors[0] = random(color_setup1);
colors[1] = random(color_setup2);
colors[2] = random(color_setup2);
colors[4] = random(color_setup1);
let circle_num = int(random(1, 2));
for (let i = 0; i < circle_num; i++) {
circleForm(0, 0, mySize * 0.85 * 1 * (i + 1) / circle_num);
if (frameCount % 50 == 0 && branch < 100) {
branch += 1 * random([1, 2, 3, 4]);
} else if (branch >= 100) {
seed = Math.random() * 7289;
seed = Math.random() * 99999;
palette = random(colorScheme).colors.concat();
if (int(seed) % 2 == 0) {
color_setup1 = random(colorScheme).colors.concat();
color_setup2 = random(colorScheme).colors.concat();
color_setup2 = random([colors8, colors81]);
function circleForm(x, y, d) {
for (let i = 0; i < branch; i++) {
angles.push(ang * (i + iteration(0.1, 0.5)));
for (let i = 0; i < branch; i++) {
let ang2 = angles[(i + int(random(10))) % angles.length];
let dd = d * iteration(0.01, 1);
drawingContext.shadowColor = random(color_setup1);
drawingContext.shadowOffsetX = 1;
drawingContext.shadowOffsetY = 1;
drawingContext.shadowBlur = 0;
stroke(colors[random([0, 1, 2, 3, 4])]);
strokeWeight(random(0.1, 0.5));
arc(x, y, dd, dd, ang1, ang2);
function iteration(s, e) {
let v = random(0.001, 0.01) / random(5, 1);
return map(cos(t + frameCount * v), -0, 1, s, e);
if (key === "s" || key === "S") {
saveCanvas("NoisePlanet_SIGMA", "png");