Skip to content

Instantly share code, notes, and snippets.

@henyana
henyana / douglasPeucker.js
Created April 8, 2012 10:51 — forked from adammiller/douglasPeucker.js
Javascript implementation of the Douglas Peucker path simplification algorithm
var simplifyPath = function( points, tolerance ) {
// helper classes
var Vector = function( x, y ) {
this.x = x;
this.y = y;
};
var Line = function( p1, p2 ) {
this.p1 = p1;