pyvisgraph icon indicating copy to clipboard operation
pyvisgraph copied to clipboard

Implemented Visvalingam's algorithm

Open lucasloisp opened this issue 9 years ago • 1 comments

The algorithm was implemented as a helper function inside the VisGraphclass, and serves the purpose of simplifying a list of polygons given aresolution. This resolution is defined in terms of the ratio between the new polygon's area and the original's.

This change regards issue #7.

A possible perfomance improvement would be to store effective_areas in a min-heap, so we wouldn't have to look up the min() every time, and instead the points would be in the correct order of removal already. However, python doesn't not provide an implementation itself, and so it would be required to either implement it ourselves or bring in a third party library (such as heapq)

lucasloisp avatar Nov 12 '16 20:11 lucasloisp

@TaipanRex you might want to check this out

lucasloisp avatar Dec 08 '16 14:12 lucasloisp