xxxxxxxxxx
24
// https://www.youtube.com/watch?v=y7sgcFhk6ZM&list=PLRqwX-V7Uu6ZV4yEcW3uDwOgGXKUUsPOM&index=5
rad = 30
let xoffset = 0
let yoffset = 10000
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
// noise retorna valores entre 0 e 1 então deve-se escala-los para o tamnho do canvas
x = map(noise(xoffset), 0, 1, 0, width)
y = map(noise(yoffset), 0, 1, 0, width)
xoffset += 0.01
yoffset += 0.01
noStroke()
fill(0, 255, 0)
circle(x, y, rad)
}