Added Canvas drawing functions
Working code with simple algorithm
Added settings to show or hide borders.