# Thread: whether several circles are covering a single one

1. ## whether several circles are covering a single one

Hi,

We have m circles on the 2D space named r1,....,r_m and a single circle r. How can we find out whether these m circles completely cover circle r.
Note that part of r can be covered by r_i, another part with r_j and so on, so that in general all parts of r are covered.
The centers and diameters of all circles are given. In general I do not want to use the equations of circles because I am trying to write a java program.

thanks

2. ## Re: whether several circles are covering a single one

How precise does this need to be? Mathematically correct, or good enough for the task you're trying to accomplish? Mathematically, it's an easy question: if every point of the circle C is within r_k of the circle c_k, for at least one k in 1...m, then you're good. Of course, it takes a while to check "every point" in practice. If you want a quick "good enough" solution, I'd recommend approximating C by a regular polygon containing it (a fan of triangles), and approximating each C_k by a regular polygon contained in it (this is if you want to err on the side of caution; you'll get false negatives occasionally, but never false positives). Checking whether a triangle is covered by other triangles is more tractable. In this case you should also ask to have this question moved.

Edit: The field that studies efficient algorithms for this kind of problem is called "computational geometry". It's interesting because it overlaps nontrivially with mathematics and computer science. On this forum you'll just get the mathematical perspective (not that nobody here knows algorithms, but it's not the purpose of this board).

3. ## Re: whether several circles are covering a single one

Thank you for the answer, Before seeing your answer I had thought of approximating each circle with an square. Your answer is a more general one. I thought maybe there exits another more precise solution.

Also thanks for the extra note which was helpful.