function setup() {
  // Please work with a square canvas
  canvasElement = createCanvas(800, 800);
  noCursor();
  noFill();
  lineColor = color(0);

  // Create an offscreen graphics object to draw into
  img = createGraphics(width, height);
  img.pixelDensity(1);

  setupGIF();
}
Simple drawing tool where mouse input gets mirrored over multiple axes

MOUSE
left click          : draw line

KEYS
1                   : toggle vertical mirror
2                   : toggle horizontal mirror
3                   : toggle diagonal mirror 1
4                   : toggle diagonal mirror 2
5-9                 : change color
0                   : color white (eraser)
arrow up            : increase line weight
arrow down          : decrease line weight
arrow right         : increase number of tiles
arrow left          : decrease number of tiles
d                   : show/hide mirror axes
del, backspace      : clear screen
g                   : start/stop gif recording
s                   : save png

CONTRIBUTED BY
[Niels Poldervaart](http://NielsPoldervaart.nl)