how to order vertices in a simple, non-convex polygon

后端 未结 4 1263
离开以前
离开以前 2020-12-21 23:06

I have a problem where I have a series of points for a simple, non-convex polygon (I hope I have the terminology correct). But the points are not necessarily in order (ie,

4条回答
  •  独厮守ぢ
    2020-12-21 23:33

    Well, you're not going to like it, but it's not possible. If you think about removing all the lines in your demonstration polygon, you could connect them in a different way and still have a valid non-convex polygon, so how's a sort supposed to know which way to go? That's what sucks about non-convex polygons.

提交回复
热议问题