Implementing HTML5 Canvas Polyline Simplification
Or, fun with vector geometry and state machines! Once again, I’m toying around with HTML5 canvas. As part of the larger project, I needed a way to generate simplified paths based on mouse drags where ‘simplified paths’ means polyline paths with as few internal points as possible to accurately express the movement of the mouse. [...]