Implemented subdivision of optimal quads using a grid method. Executing on the demo works. Added a method for drawing lines with fabricjs in the demo.