function setup() {
  createCanvas(600, 600);
  colorMode(HSB, 360, 100, 100, 100);
  background(360);

  angle = getRandomAngle(direction);
  posX = floor(random(width));
  posY = 5;
  posXcross = posX;
  posYcross = posY;
}
draw the path of an intelligent agent

MOUSE
position x          : composition speed of the picture

KEYS
DEL/BACKSPACE       : clear display
s                   : save png