Given
- a rectangle defined by its corners $(0, 0)$ and $(w,h)$,
- $n$ circles $\{ (x_1, y_1), (x_2, y_2), \dots, (x_n, y_n)$ with the same radius $r$,
I need to determine the smallest possible radius r so that there is no way to get from $(0,0)$ to $(w, h)$ without touching those circles.
What I have tried is
- Use binary search to determine r
- But the issue is that since there is no limitations for the coordinates of the points (e.g. for them to be integers) I can't get any idea how to construct a graph and use some path finding algorithm such as DFS.
Any help would be appreciated.
Examples
Example 1, $w = 15, h = 20$; circles with coordinates $(2,7)$ and $(7,3)$; the result is $d \sim 3.2016$
Example 2 (without the right radius, but just to show what the issue is)