rgeometry icon indicating copy to clipboard operation
rgeometry copied to clipboard

O(n) Simple Polygon Visibility

Open obayomy opened this issue 4 years ago • 6 comments

obayomy avatar Jul 16 '21 23:07 obayomy

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?

obayomy avatar Jul 17 '21 00:07 obayomy

@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:

  1. We can neglect all outside cases and not calculate the visibility polygon.
  2. We can calculate it for blocked exterior case only (which the naïve already does)
  3. Finally, we can calculate for all cases.

obayomy avatar Aug 16 '21 06:08 obayomy

I'll work on making it easier to test the visibility algorithms once I'm back from vacation.

lemmih avatar Aug 16 '21 09:08 lemmih

Hm, I wonder if jyputer integration would make it easier to debug these algortihms.

lemmih avatar Sep 13 '21 07:09 lemmih

You mean the jupyter notebook? how it might help?

obayomy avatar Sep 14 '21 05:09 obayomy

I'm thinking it would make the intermediate steps of the algorithm easier to visualise.

lemmih avatar Sep 14 '21 05:09 lemmih