O(n) Simple Polygon Visibility
Using proptest will cause the algorithm to overflow, I can try recreating the randomly generated polygon with a bigger size data type for now.
Maybe we should create an issue for handling overflows in general?
@Lemmih The algorithm is almost complete. However, in order to test it against the naïve implementation we need a point in polygon algorithm that tells whether the point is blocked or free exterior. I think we also need to decide how the algorithms should behave in point-outside-polygon cases:
- We can neglect all outside cases and not calculate the visibility polygon.
- We can calculate it for blocked exterior case only (which the naïve already does)
- Finally, we can calculate for all cases.
I'll work on making it easier to test the visibility algorithms once I'm back from vacation.
Hm, I wonder if jyputer integration would make it easier to debug these algortihms.
You mean the jupyter notebook? how it might help?
I'm thinking it would make the intermediate steps of the algorithm easier to visualise.