Unordered cloud point of polygon contour to polygon <p>Dear Stackoverflow community,</p> <p>I have contours of irregular polygons as unordered datapoints (like on the figure here: <a href="http://s16.postimg.org/pum4m0pn9/figure_4.png" rel="nofollow">http://s16.postimg.org/pum4m0pn9/figure_4.png</a>), and I am trying to order them (ie. to create a polygon).</p> <p><img src="http://s16.postimg.org/pum4m0pn9/figure_4.png" /></p> <p>I cannot use the convex hull envelope because of the non convex shape of the polygon. I cannot ase a minimum distance criterion because some points of other parts of the contour lie closer (example: point A has to be joined with B, but is closer to C). I cannot use a clockwise ordering because of the irregular shape of the contour.</p> <p>Do anyone knos a way to implement (preferentially in Python) an algorithm that would reorder the datapoints from a starting point?</p>