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(i);
let y = height * noise(i);
ellipse(x, y, 10);
}
}
function mouseClicked() {
drawNoise();
}