How to find the largest circle that lies within a sampled boundary?

后端 未结 3 1977
深忆病人
深忆病人 2021-01-13 04:42

Given sets of 2D points which are the boundaries of an irregular shape, a shape which may not be convex and may have internal holes, is there an algorithm to find the larges

3条回答
  •  暖寄归人
    2021-01-13 05:05

    A very dumb algorithm :) (likely something faster is possible)

    The largest circle should touch at least 3 objects (object is either vertex or line).

    So you can count all combinations O(n^3), build a circle for each one, check that it lies inside of the area (O(n)) and select the largest one. Totally - O(n^4).

提交回复
热议问题