How to order points anti clockwise

后端 未结 5 1669
梦毁少年i
梦毁少年i 2021-02-20 04:22

Lets take thess points.

pt={{-4.65371,0.1},{-4.68489,0.103169},{-4.78341,0.104834},{-4.83897,0.100757},
{-4.92102,0.0949725},{-4.93456,0.100181},{-4.89166,0.1226         


        
5条回答
  •  后悔当初
    2021-02-20 04:52

    Maybe you could do something with FindShortestTour. For example

    ptsorted = pt[[FindShortestTour[pt][[2]]]];
    ListPlot[ptsorted, Joined -> True, Frame -> True, PlotMarkers -> Automatic]
    

    produces something like

    plot of shortest tour

提交回复
热议问题