xxxxxxxxxx
36
let phase = 0;
let zoff = 0;
function setup() {
createCanvas(windowWidth, windowHeight);
//let r = floor(random(10000));
//let r = 6273;//floor(random(10000));
//console.log(r);
//frameRate(1);
}
function draw() {
//noiseSeed(frameCount);
background(0);
translate(width / 2, height / 2);
stroke(255);
noFill();
phase += 0.01;
beginShape();
for (let a = 0; a < TWO_PI; a += 0.02) {
// let xoff = map(cos(a),-1,1,0,mouseX/100);
// let yoff = map(sin(a),-1,1,0,mouseX/100);
// let xoff = map(cos(a),-1,1,0,2);
// let yoff = map(sin(a+phase),-1,1,0,2);
let xoff = map(cos(a), -1, 1, 0, 2);
let yoff = map(sin(a), -1, 1, 0, 2);
const r = map(noise(xoff, yoff,zoff), 0, 1, 100, 250);
let x = r * cos(a);
let y = r * sin(a);
vertex(x, y);
}
endShape(CLOSE);
zoff += 0.01;
//save(frameCount + ".png");
}