# Tiling circles intersection with squares

Is there an algorithm to calculate the amount of $$1\times 1$$ tiles that the intersection of $$2$$ circles lies into, given 2 circles in a $$30\times 30$$ grid with their radiuses and centers?

What I tried was approximating by using the line between the intersection points but this doesn't work when the intersection is wider than $$1$$ line of tiles.

Another version of this question is how can I check if a tile with given coordinates lies in the intersection of $$2$$ circles.

• Do the 1x1 tiles have to be contained completely in the intersection or do they just have to touch the intersection? – Neo Nov 13 '18 at 11:21
• @Neo a part of the tile has to lie in the intersection. So not completely. – Kristijan Nov 13 '18 at 11:24