Validity of algorithm for creation of a non self-intersecting polygon

后端 未结 5 1233
南旧
南旧 2021-01-01 04:35

As an extension and partial answer to my thread I wrote a simple algorithm that given a set of points(with xy coordinates) can form a non self-intersecting polygon.


5条回答
  •  旧巷少年郎
    2021-01-01 05:06

    I would prove it slightly differently by setting the "divider line" as a connection between left-most and right-most points, rather than parallel to x axis. It could happen that there are no points below or above the parallel-to-x line and that could cause trouble to your proof.

    Also, connection (5) could lead to some self-intersections with the connections generated in point (6)

    There is also a special case when all points are colinear and your polygon is degraded to a line.

    We assume that the set V of vertices is finite ;)

    Other than that - I believe your claim is true.

提交回复
热议问题