kowalsk1's blog

By kowalsk1, history, 7 years ago, In English

Does anyone know an algorithm to solve the following problem:

Given a sequence of points in the plane that represent a polygon (not necessarily convex), output the maximum possible radius of a circle that can fit inside this polygon.

It would be good if it was below O(n2), but any references are welcome. Thanks ahead.

  • Vote: I like it
  • -8
  • Vote: I do not like it

| Write comment?
»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by kowalsk1 (previous revision, new revision, compare).

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

If it was convex, you could make inequalities of form Ax+By+Cr>=0. For non-convex you need something different.

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Binary search for R. if you choose R to be your radius check if size R circle fits inside.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it -8 Vote: I do not like it

    You probably will need veronoi diagrams.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    How do you determine in which point should be center of the circle?

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      All right, I already understand how. If somebody still curious — visit this article.

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

In each vertex with reflex angle generate two new polygons without that vertex. Black is non-convex. Red and green are new polygons. And after having only convex ones get maximum of circles in each polygon. Algorithm at emaxx for convex.

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Btw, why did you not just google your question? I found answer for that in few minutes.

  1. Identical question on StackOverflow. There are few interesting answers, so I will not share single one.
  2. Research paper with different from suggested on StackOverflow approaches.