function setup() {
  createCanvas(640, 480);
  background(255);
  x = width / 2;
  y = height / 2;
  video = createCapture(VIDEO, function() {
    streamReady = true;
  });
  video.size(width * pixelDensity(), height * pixelDensity());
  video.hide();
  noFill();
}
generating a drawing by analysing the pixels of a live video input

MOUSE
position x          : drawing speed
position y          : diffusion

KEYS
arrow up            : number of curve points +
arrow down          : number of curve points -
q                   : stop drawing
w                   : continue drawing
DEL/BACKSPACE       : clear display
s                   : save png