1
$\begingroup$

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.