LINKDING

Shared bookmarks

Line Simplification with Ramer–Douglas–Peucker · Michael-F-Bryan

Date added
July 9, 2024, 4:41 a.m.
Description
The other day I needed to do a fairly routine graphical operation, to “simplify” a polyline with many points into a simpler polyline which has roughly the same shape plus or minus some tolerance factor. My actual use case was in sending linear movements to a CNC machine. Drawings are defined using floating point numbers and can be “accurate” to about 7-15 decimal places (depending on if you use floats or doubles) but when you take the machine’s mechanical tolerances and material effects into account the final cut is only really accurate to about 1 decimal place (0.