xxxxxxxxxx
29
let step = 0;
function setup() {
createCanvas(400, 400);
}
function butterfly(step){
translate(200, 200);
let coords = [];
const rounds = step % 360;
const ee = step % 1.618;
colorMode(HSB);
var i = 0;
while (i < rounds) {
var x = cos(i*PI)*ee*ee*rounds % 400;
var y = sin(i)*ee*rounds % 400;
stroke(noise(x+y+step)*250);
//print(`${x} ${y}`);
point(x, y);
i++;
}
}
function draw() {
butterfly(step);
step++;
}