Determining ordering of vertices to form a quadrilateral

前端 未结 5 1051
离开以前
离开以前 2021-02-10 18:24

Suppose I have 4 vertices in 2D space. Does anything know of an efficient algorithm which will give me an ordering of the vertices which corresponds to a simple quadrilateral?

5条回答
  •  鱼传尺愫
    2021-02-10 19:05

    You can just google for sorting points in clockwise order and you get e.g.:

    Sort four points in clockwise order
    Sort points in clockwise order?

提交回复
热议问题