xxxxxxxxxx
24
function setup() {
createCanvas(1000, 400);
frameRate(10);
createLoop(3, {
gif: true,
gifFileName: "noiseLoop2d.gif",
download: true,
noiseRadius: 0.15
});
}
let x = 10;
let y = 10;
function draw() {
background(0);
translate(0, height / 2);
const distributionFrequency = 0.03;
for (let x = 0; x < width; x++) {
const y = animLoop.noise1D(x * distributionFrequency) * height/2.5;
fill(random(0,256), random(0,256), random(0,256));
ellipse(x, y, 5);
}
}