Besides the obvious stupidest algorithm, which was to take every Nth vertex from the polygon (reducing the number of vertices by N), here is an idea inspired by some 3D algorithms.
Usually in 3D, you want to remove faces that make a smaller contribution to the total. To do this, we are trying to simplify the “flattest” areas of the model.
Now in 2D you can translate this to “simplify the segments that have the smallest angle between them. The first naive implementation could be:
- Calculate all angles between segments of Si and Si + 1 polygon
- Take all angles below a given threshold (or take the M smallest angles)
- Simplify the segments identified in 2. (replace [Pi, Pi + 1] and [Pi + 1, Pi + 2] with [Pi, Pi + 2])
- Repeat from 1. until we reduce our polygon
, , . (Pi + 1) ([Pi, Pi + 2])
:
, , :
, : http://motiondraw.com/md/as_samples/t/LineGeneralization/demo.html, : http://www.geom.unimelb.edu.au/gisweb/LGmodule/LGSimplification.htm