Circular motion, perlin noise in P5js
var t;
var factor_of_rad;
function setup() {
createCanvas(800, 800);
noFill();
t = 0;
factor_of_rad = 280;
background(0);
}
function draw() {
translate(width / 2, height/2);
beginShape();
for (var i = 0; i < width; i++) { var ang = map(i * 0.1, 0, width, 0, PI + (width / 6)); var rad = factor_of_rad * noise(i * 0.01, t * 0.005); var x = rad * cos(ang); var y = rad * sin(ang); var colorvar = frameCount; if (colorvar >= 255) {
colorvar = 0;
} else {
colorvar = frameCount;
}
var r = map(colorvar, 0, width, random(255), 255);
var g = map(colorvar, 0, width, random(255), 100);
var b = map(colorvar, 0, height, random(255), 255);
stroke(r, g, b, 15);
curveVertex(x, y);
}
endShape(CLOSE);
t += 1;
if (frameCount % 300 === 0) {
background(0);
}
}