xxxxxxxxxx
32
let zoff = 0;
function setup() {
createCanvas(600, 600);
frameRate(12);
}
function draw() {
background(0);
translate(width/2, height/2);
stroke(255);
fill('orange');
noStroke();
beginShape();
// let noiseMax = slider.value();
let noiseMax = random(0.5, 0.8);
for(let a = 0; a < TWO_PI; a += 0.05) {
let xoff = map(cos(a), -1, 1, 0, noiseMax);
let yoff = map(sin(a), -1, 1, 0, noiseMax);
let r = map(noise(xoff, yoff, zoff),
0, 1, 20, 200);
let x = 0.8 * r *cos(a);
let y = r * sin(a);
vertex(x,y);
}
endShape(CLOSE);
zoff += 0.05;
}