function draw() {
  background(255);

  shapes.forEach(function(shape) {
    shape.draw();
  });

  if (newShape) {
    newShape.h = shapeHeight;
    newShape.c = shapeColor;
    newShape.addPos(mouseX, mouseY);
    newShape.draw();
  }
}
Drawing tool for creating moire effect compositions using
smooth path of any length, width, smoothness and colour.

MOUSE
mouse               : click and drag to draw moire pattern path

KEYS
1                   : set color to red
2                   : set color to green
3                   : set color to blue
4                   : set color to black
arrow right         : increase smoothness
arrow left          : decrease smoothness
arrow up            : increase rectangle width
arrow down          : decrease rectangle width
s                   : save png

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