TITLE: Inserting points into a polygon
QUESTION [5 upvotes]: I want to insert $n$ points into arbitrary polygon $P$ described by ordered list of its vertexes $v_1, v_2, ..., v_m$. Each inserted point must distanced from the others on distance at least $d$. In case when $n$ it to large to do it, we should be able to detect such situation.
Here is example solution for $n=8$ (green circle diameter is equal to some $d$).

I try to find something about this problem on internet but no luck. So also I try myself to figure out how to do it - my idea was to split polygon into convex parts and put points on each part but there is problem to set proper distance between points in two parts (and putting points into convex part is also not trivial for me). Any idea?

REPLY [2 votes]: I don't think there is an easy greedy algorithm for this, circle packing is a hard problem and most results are about simple instances e.g. circle packing in a circle, square, equilateral triangle and it is one of the problems in the book "Unsolved problems in geometry
there is an upperbound on $n$ of $\lfloor{\frac{A + Pd}{\pi d^2}}\rfloor ​+ 1$  where $A, P$ are the area and perimetar of the polygon, which can be proved easily for the case of convex polygons, but that upperbound is not always possible
I suggest to try to use randomized algorithms, I also do think that genetic algorithms can get great results for this problem