/vacuate

Douglas–Peucker algorithm

Primary LanguageJavaScript

Douglas Peucker抽稀算法的JavaScript实现

用法

npm install vacuate --save
import vacuate from 'vacuate'

vacuate(points, tolerance)

  • points: 待抽稀的点集合,例如[[1,2], [3,4], ...]

  • tolerance: 抽稀阈值

  • return: 抽稀后的数组