createCanvas(windowWidth, windowHeight);
colorMode(HSB, 360, 100, 100, 100);
for (let j = 0; j < NUM; j++) {
circlePos[j] = createVector(0, 0);
translate(width / 2, height / 2);
for (let j = 0; j < 15; j++) {
let curRadius = map(j, 0, NUM - 1, height / 100.0, radius * 2.0);
let curVel = velocity / NUM * (j + 50);
let curPos = circlePos[j];
curPos.x = cos(radians(frameCount + 6000) * curVel) * radius;
curPos.y = sin(radians(frameCount + 6000) * curVel) * radius;
text("H",curPos.x-58,curPos.y+58);
for (let i = 0; i < 30; i++) {
let hue = map(i, 20, 11, 0, 50);
scale(moveBounce(0.9, 2.0, 0.5));
rotate(moveBounce(-radians(5.0), radians(90.0), 0.3));
translate(0, moveSin(0.5,0.1,2.0));
function moveSin(min, max, speed) {
let t = radians(frameCount * speed);
let out = map(sin(t), -1.0, 1.0, min, max);
function moveNoise(min, max, speed) {
let t = frameCount / 60 * speed / 4.0;
let out = map(noise(t), 0.0, 1.0, min, max);
function moveBounce(min, max, speed, nPow = 3.0) {
let t = radians(frameCount * speed);
for (let i = 1; i < 2 * nPow; i += 2) {
osc += sin(t * i) / float(i);
let out = map(osc, -1.0, 1.0, min, max);