xxxxxxxxxx
31
var xoff1= 0;
var xoff2= 20000
function setup() {
createCanvas(400, 400);
}
function draw() {
background(0);
//just random and jaggy motions of cicrcle
//var x = random(width);
//map 0 to 1 to 0 to width b/c of noise only being from 0 to1
//perslin noise values cluster more around the center between the values
var x = map (noise(xoff1), 0,1,0, width);
var y = map (noise(xoff2), 0,1,0, height);
//random but more smooth motions of circle bceause you increment it by .01 to the next random number
xoff1 -= 0.01;
xoff2 -= 0.01;
ellipse( x, y, 50,50);
}