mbostock
Adaptive resampling recursively subdivides input polygons, applying the Douglas–Peucker perpendicular distance check to determine whether additional samples are needed.
https://d3js.org/d3.v3.min.js