Ex_00_05_RandomWalker_PerlinNoise

random walker
perlin noise

perlin noise is noise()

class Walker{
  
  float x,y;
  float tx,ty;
  
  Walker(){
    tx = 0;
    ty = 10000;
  }
  
  void step(){
    x = map(noise(tx), 0,1, 0,width);
    y = map(noise(ty), 0,1, 0,height);
    
    tx += 0.01;
    ty += 0.01;
    
    noStroke();
    fill(64,50);
    ellipse(x,y,16,16);   
  }
}

Walker w; // walker object

void setup(){
  size(600,600);
  w = new Walker();
  background(255);
}
void draw(){
  w.step();
}