I'm trying to come up with a way to order 'random' (poly) lines, knowing only the coordinates of the vertices (and, obviously, which vertices belong to any given line).(adsbygoogle = window.adsbygoogle || []).push({});

I'm not a mathematician or geometrician, but I have a feeling there must be an 'easy' way to do this!

Would probably have to break down the problem something like this:

1) Somehow, calculate a 'direction' for the ordering (e.g., vertical lines could be ordered left-to-right or right-to-left, horizontal lines top-to-bottom or bottom-to-top, polygons inside-to-outside etc.)

2) Decompose the lines to some simplified property (the centroid?) that will put them "in order" along the direction from 1).

Any suggestions gratefully received!

**Physics Forums - The Fusion of Science and Community**

# Robust Algorithm to Order Parallel Polylines

Know someone interested in this topic? Share a link to this question via email,
Google+,
Twitter, or
Facebook

- Similar discussions for: Robust Algorithm to Order Parallel Polylines

Loading...

**Physics Forums - The Fusion of Science and Community**