Skip to content

Instantly share code, notes, and snippets.

View thorinside's full-sized avatar

Neal Sanche thorinside

View GitHub Profile
@thorinside
thorinside / douglasPeucker.js
Created February 26, 2012 20:56 — 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;