I have a list of segment represent lines:
(list (list 0 1) (list 1 0)) -..- (list (list 0 1) (list -1 0)) -..- (list (list -1 0) (list -3 3)) -..- (list (list 4 4) (list 4 6))
And i need to join all to obtain one (or more if not possible) polyline continuos.
There are not order in segment point (first, i think order by x and if equal x order by y)
to obtain (in sample 2 list of points continuos)
(list (list 0 1) (list 1 0)) -..- (list (list 0 1) (list -1 0)) -..- (list (list -1 0) (list -3 3)) -..- (list (list 4 4) (list 4 6))
|_______________________| |_______________|
common point common point
one polyline another polyline

(list -3 3) (list -1 0) (list 0 1) (list 1 0) (list 4 4) (list 4 6)
Any idea to do this?
Thanks a lot.