Skip to content

Instantly share code, notes, and snippets.

@TimSC
TimSC / RamerDouglasPeucker.cpp
Created April 5, 2016 11:22
2D implementation of the Ramer-Douglas-Peucker algorithm in C++
//2D implementation of the Ramer-Douglas-Peucker algorithm
//By Tim Sheerman-Chase, 2016
//Released under CC0
//https://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm
#include <iostream>
#include <cmath>
#include <utility>
#include <vector>
#include <stdexcept>