Finding safe points in polygons

23 Views Asked by At

Let $P$ be an axes-parallel polygon. A point $(x,y)\in P$ is called safe if for any pair $d_x\in[0,1],d_y\in[0,1]$, either $(x+d_x,y+d_y)$ or $(x-d_x, y-d_y)$ or both are in $P$.

Figuratively, suppose there is an adversary that gives you a pair $(d_x,d_y)$, and forces you to either move $d_x$ right and $d_y$ up, or move $d_x$ left and $d_y$ down. A point $(x,y)$ is safe if, when you start at $(x,y)$, you can remain within $P$ for any choice of $(d_x,d_y)$.

For example, if $P$ is a rectangle, then the un-safe points are the points at squares of side-length 1 near the bottom-right and top-left corners, since when starting at one of these points, the adversary can pick $(1,1)$ and force you to move out of $P$. So the safe points are:

enter image description here

But things get more complicated for more complex polygons. For example, suppose $C$ is the polygon above (the rectangle without the two corners), and consider the two points marked below:

enter image description here

In both points, if the adversary chooses $(1,1)$, then we can move to the top-right and remain within $P$. But the blue O is unsafe, because the agent can choose e.g. $(0.5,1)$ or $(0.5,0.5)$. On the other hand, the green X is safe: if $d_x<0.5$ we can move to the bottom-left, and if $d_X\geq 0.5$ we can move to the top-right; in both cases we remain within $P$.

Is there a simple way to characterize the set of all safe points for a given axes-parallel polygon?