We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Concave Polygon
Concave Polygon
Sort by
recency
|
9 Discussions
|
Please Login in order to post a comment
Why can't I download some test cases? when I try I am presented with:
{"error":"Sorry! testcases are not available for download"}
This is indeed a subproblem of the Convex Hall Problem. Most of the Convex Hall Algorithm uses a function to determine whether consecutive 3 points are counter-clockwise or not. This problem can be solved by using this counter-clockwise function after sorting points (for example, by polar angle)
Test case 2 has self intersecting polygon.
5
0 0
2 0
0 2
2 2
1 0
Expected result is 'No'. really?
cool, got to re-use code for the convex hull problem:
FYI, test #1 seems to have Windows new lines (i.e. \r) which causes ocaml's read_int () to freak out. It would be nice if this could be fixed.