Skip to content

Instantly share code, notes, and snippets.

View cal10's full-sized avatar
:shipit:

Carlos Moisés Alvarez Linares cal10

:shipit:
View GitHub Profile
@cal10
cal10 / douglasPeucker.js
Created September 26, 2025 10:47 — 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;