Simplify polygon

hh hh at hyperhh.de
Tue Aug 15 15:16:46 EDT 2017


Today I implemented the Ramer-Douglas-Peucker algorithm for reducing the
number of points of a polygon such that the "shape" of that polygon is
preserved as good as possible, controlled by a tolerance parameter.
This is known as "simplifying" of a polygon (is also done for polygon/
polyline paths in SVG, could be done in LC Builder).

The algorithm is fast and very effective. May be interesting for some of
you who work with map outlines ("coastlines") or auto traced outlines of
images/graphics, signatures or freehand-drawings:

http://forums.livecode.com/viewtopic.php?p=157049#p157049
(=Raspi stacks collection #103)





More information about the Use-livecode mailing list