5

In a simulated landscape comprised of tiled hexagons of a uniform size, if I were to drop a circle in this landscape at a random location, how could I determine a probability distribution function which describes the many hexagons would overlap (including partial overlaps) the randomly placed circle.

enter image description here

The example image shows 22 hexagons at least partially overlapping the circle. So the question would be what is the probability that I'd get this value (or alternate values) if the circle was randomly placed on this landscape?

For a bit of context here, I'm interested to see if I can get some probability distribution function for species distribution mapping which accurately represent the life history of a particular species. In this case, I'm interested in a probability distribution function describing how many bird territories are within an observers sampling area.

I currently just use simulations to get a distribution resembling this, but I'm sure there's a cleaner, more efficient way to derive this distribution from geometric proofs. My question is somewhat similar to this.

Note: My math is pretty amateur, so if please let me know if my question is unclear.

Edit 1:

Perhaps to make this easier (maybe?), I'm happy with an approximation to the solution, so perhaps using slightly overlapping circles rather than hexagons makes the problem more feasible?

  • I think a precise formula would be extremely complicated and hard to reach. Would an approximation do ? If yes, is the radius of the circle rather big compared to the side of an hexagon ? – Evargalo May 18 '17 at 16:21
  • An approximation would be great! I can compare an approximation to simulations to see if the error is low enough. For the size of the circle, it should fit in around 4-8 hexagons (the picture was a little misleading for the sizes, but i didn't think that it would be an important point for solving this). –  May 18 '17 at 17:18
  • 1
    I totally agree with your edit: overlapping circles will be much easier to deal with than hexagon and will give you an upper bound that can later be improved on if need be. I will look at it this weekend and I hope I can comme with some result. – Evargalo May 19 '17 at 15:37
  • Does the case where only the perimeter of the circle and a hexagon come into contact count as an overlap. In other words, their interiors don't come into contact. – Peter May 22 '17 at 20:45
  • I would be happy with either case. Id suggest doing whatever is easier. If I'm forced to make a choice, id say perimeters count as contact. –  May 22 '17 at 21:07
  • @Evargalo Since we're looking for a probability distribution, I don't understand what you mean by "upper bound that can be improved on" ? Given one configuration of a circle in the hexagon grid, you can give an upper/lower bound, but to go from there to the world of probabilities, I don't get it... – N.Bach May 22 '17 at 22:16
  • 1
    @ N.Bach I admit my formulation was not very clear. In proper probalistic words, the Cumulative Distribution Function I would get by calculating the number of small circles overlapping the big circle would be everywhere inferior to the Cumulative Distribution Function with hexagons that the OP is looking for. – Evargalo May 23 '17 at 13:07

1 Answers1

0

The answer depends on the radius of the circle. The case of the hexagons is much more complicated than the case of circles. So we assume that instead of the hexagons you have circles of radius $r$ centered at the points of the grid $mU+nV$ for $n,m\in\Bbb{Z}$, $U=(1,0)$ and $V=\left(\frac 12,\frac{\sqrt{3}}{2}\right)$, with $\frac 12\le r \le \frac{\sqrt{3}}{3}$.

If you want to know the probability distribution function which describes how many small circles would overlap a randomly placed circle of radius $R$ and center $P$, you have to draw circles of radius $r+R$ around each nearby point in the grid and the point $P$ in the plane is inside a certain number $N=N(P)$ of these big circles. The circle of radius $R$ would overlap with $N$ small circles.

The probability you are searching is the proportion of the area of the plane where all points have $N(P)=N$. By symmetry you can restrict the computations to the area inside the triangle $A$ formed by $$ (0,0),\left(\frac 12,0\right)\quad\text{and}\quad \left(\frac 12,\frac{\sqrt{3}}{6}\right). $$

Then the circle of radius $R$ will cut the triangle into pieces, and all the points in each piece would be all inside the same set of big circles with radius $R+r$. So for all points in one piece the value of $N(P)$ is the same. The area of all the pieces corresponding to a fixed $N$, divided by the area of the triangle, is the probability that a randomly placed circle will overlap $N$ small circles.

So the computation reduces to the area of pieces of a triangle cut by circular arcs.

For example consider the case where $r+R=2$. Then the triangle $A$ is inside the circles centered at $mU+nV$ for $(m,n)\in\{(-1,0),(0,0),(1,0),(2,0),(0,-1),(1,-1),(2,-1),(-1,1),(0,1),(1,1),(-1,2),(0,2)\}$ and overlaps partially the circles centered at $mU+nV$ for $(m,n)\in\{(-2,1),(-1,-1),(1,-2),(2,-2)\}$. So each randomly placed circle overlaps (partially or completely) at least 12 small circles and at most 16.

Now comes the clumsy part: You have to cut the triangle into pieces and compute the area of each piece. The equations of the four critical circles are: $$ \left(x +\frac32\right)^2 + \left(y - \frac{\sqrt{3}}2\right)^2 = 4,\quad \left(x + \frac32\right)^2 + \left(y + \frac{\sqrt{3}}2\right)^2 = 4, $$ $$ x^2 + (y + \sqrt{3})^2 = 4,\quad (x -1)^2 + (y + \sqrt{3})^2 = 4. $$ The triangle is cut into 7 pieces, two pieces correspond to $N=14$, two pieces correspond to $N=15$, and one piece each correspond to 12,13 and 16 respectively.

Now you have to do basic geometry on the plane or use calculus. For example, the area of the piece corresponding to $N=16$ is $$ R=\int_0^{a_0}\left(-\sqrt{3}+\sqrt{4-(x-1)^2}\right)dx+\int_{a_0}^{b_0}\left(-\sqrt{3}/2+\sqrt{4-(x+3/2)^2}\right)dx\sim 0.01882, $$ where $a_0=\frac{1}{28}(-7+3\sqrt{21})$ and $b_0=(\sqrt{13}-3)/2$.

Since the area of $A$ is $\frac{\sqrt{3}}{24}\sim 0.0721688$, we obtain that the probability of overlapping(partially or completely) 16 circles is $$ P(16)=\frac{Area\ of\ the\ piece\ corresponding\ to\ 16}{Area\ of\ A}\sim 0.26077822. $$

san
  • 13,742
  • I think it's possible to let a computer do all the computation by using arrangements. That method should also let you compute the exact distribution in the hexagonal case too. Coding it looks a little bit annoying though. – N.Bach May 26 '17 at 10:45
  • I just realized that in the hexagonal case the triangle is cut into pieces by curves that are combination of straight lines and arcs of circles. The equations are more complicated, but it the method is essencially the same. – san May 26 '17 at 15:13
  • 1
    I saw this posted yesterday, but it took me sometime to get my head around it. Conceptually, I understand how you solved the problem, and this answers my question at hand. However, I'm confused at the step of calculating the basic areas of the chopped triangle pieces. Would it be possible to get a little more elaboration on how you derived the formula for the area of the piece corresponding to N = 16? Then I will have everything I need to implement this in some code. Regardless, this is great! Unless a better answer pops up in the next 24 hours, I'll award the bounty here. –  May 27 '17 at 16:51
  • 1
    The piece corresponding to $N=16$ is limited by two arcs and the x-axis. One arc correspond to the circle with center $(1,-\sqrt{3})$ and the other to the circle with center $(-3/2,-\sqrt{3}/2)$. The first arc goes from the origin to the intersection point of the two circles $(a_0,f(a_0))=\left(\frac{1}{28}(-7+3\sqrt{21},\frac{3}{28}(-7\sqrt{3}+5\sqrt{7}) \right)$, and the second arc goes from the intersection point of the two arcs to the intersection of the second arc with the x-axes $(b_0,0)=((\sqrt{13}-3)/2,0)$. – san May 27 '17 at 23:57
  • 1
    Hence the area is the integral of the function given by the first arc $f(x)=-\sqrt{3}+\sqrt{4-(x-1)^2}$ from 0 to $a_0$ plus the integral of the function given by the second arc $g(x)=-\sqrt{3}/2+\sqrt{4-(x+3/2)^2}$ from $a_0$ to $b_0$. This piece is the easiest to compute using integrals, in general one has to integrate the difference of two functions given by arcs (or eventually the x-axis) from one intersection point to the next. – san May 27 '17 at 23:58
  • Wonderful! I can now follow the whole answer you laid out. Thanks for elaborating that last part for me. –  May 28 '17 at 17:30