0
$\begingroup$

Is there any algorithm or an image analysis method ( like point process) that can be used to find areas of intersection of n circles?

  • 0
    do you just want the area (a number) or some way of representing the intersection itself (a shape)2017-02-25
  • 0
    @Tim my goal is to find the areas' borders2017-02-25
  • 0
    I don't know if there's a named one. It's certainly possible. I can have a go at coding something. What language are you using?2017-02-25
  • 0
    @Tim thank you very much. I don't use a specific language , I still think about a theoretical analysis and work, if you want to do some coding I would be happy to collaborate.2017-02-25

1 Answers 1

2

First look at a simple case. Suppose that circle $A$ has radius $r_a$ and centre $(0,0)$ and circle $B$ has centre $(0,R)$ and radius $r_b$. Assume further that $r_a>r_b$. The intersection of the two circles is

  • Empty if $r_a + r_b < R$
  • circle $A$ if $r_a - r_b > R$
  • Interesting if $r_a - r_b < R < r_a + r_b$

In the interesting case the boundary of the intersection is made up of two arcs, one from circle $A$ and one from circle $B$. Let's find the arc from circle $A$.

There are two points where the boundaries of the circles intersect one point at $(\ell, h)$ and the other at $(\ell, -h)$ By Pythagoras we have $\ell^2 + h^2 = {r_a}^2$ Similarly $$\begin{align}{r_b}^2 &= h^2 + (R-\ell)^2\\ &= h^2 + R^2 +\ell^2 - 2R\ell \\ &= R^2 + r_a^2 - 2 R\ell \\ \Rightarrow \ell &= \frac{R^2 +{r_a}^2-{r_b}^2}{2R}\end{align}$$

So the arc from circle $A$ is the arc between angles $(-\theta,\theta)$ where $r_a\sin\theta = \ell$.

I've only used lengths in the calculation of $\theta$ so for any two circles you can find the angle $\alpha$ between the two centres and apply the same calculation to get an arc between $(\alpha-\theta, \alpha + \theta)$

Now let's introduce circle $C$ part of my arc will be outside circle $C$ and won't contribute to the boundary, and part of my arc will be inside circle $C$. This part of the arc is the boundary between $A\cap B \cap C$ and $B\cap C \cap A^\complement$ that is

  • It is the contribution to the boundary of circle $A$ to the intersection $A\cap B\cap C$
  • It is part of the contribution of circle $A$ to the intersection $A\cap C$

So the contribution to the boundary of circle $A$ is the intersection of the two arcs between circles $A$ and $B$ and circles $A$ and $C$ as calculated above.

Now you can reason inductively and argue that the contribution to the boundary of circle $A$ to the intersection of $N$ circles is the intersection of the pairwise arcs calculated as above.

This gives you a basic algorithm which runs in $\mathcal O(N^2)$ where $N$ is the number of circles.

  1. Choose a circle $A$ and for each $B\neq A$ calculate an arc $(\theta_{a,b}^0, \theta_{a,b}^1)$ as above.
  2. Calculate the intersection of all the arcs. If the intersection is empty discard circle $A$ and begin again with a new circle.
  3. If not the intersection will be in the form $(\theta_{a,x}^0, \theta_{a,y}^1)$ for two circles $X$ and $Y$.
  4. Perform steps 1 and 2 for circle $Y$ this must give you something in the form $(\theta_{y,a}^0, \theta_{y,z}^1)$
  5. Repeat with circle $Z$ and keep going until you get back to circle $A$.

This will give you a list of arcs and if you keep track of the endpoints of your arcs a polygonal path. The intersection is then the union of the segments formed by the arcs and the inside of the polygonal path.

  • 0
    I have a few questions : 1) By R you mean the X axis ?,2)Here you assume the circles are not homogenous , what if they are homogenous , have the same radius?2017-03-05
  • 0
    1) $R$ is the distance between the centres of the two circles. For the first stage I assumed both circles have centres on the x axis, one at $(0,0)$ and one at $(0,R)$. 2) I should have written $r_a\geq r_B$. If $r_a = r_b = r$ then we get $\ell = \frac R 2$ and $\sin \theta = \frac R{2 r}$.2017-03-05