xxxxxxxxxx
25
let NUM_SAMPLES = 512;
function setup() {
createCanvas(400, 400);
background(220, 20, 120);
noStroke();
}
function draw() {}
function drawNoise() {
fill(255);
stroke(0);
for (let i = 0; i < NUM_SAMPLES; i++) {
let x = width * noise(1010 + i / 100);
let y = height * noise(2020 + i / 100);
ellipse(x, y, 10);
}
}
function mouseClicked() {
drawNoise();
}