I am interested in determining whether two rasterized circles (e.g. using the Midpoint circle algorithm) intersect. The two circles are defined by a center (x-y coordinate) on the grid, and a radius. For example, a circle with centre (6, 6) and radius 3 is plotted here: https://docs.opencv.org/3.0-beta/_images/fast_speedtest.jpg . Note that points are all on a 2d plane, with centers on the gridlines.
Two circles overlap if there exists at least point (aka pixel) that belongs to both their circumferences. Here is a simple plot showing in black the center of an arbitrary circle along with an arc of its circumference, in red the centres of circles that overlap the black circle, and in green the centres of circles that do not overlap the black circle:
I am trying to determine a formula that, given the definitions for both circles, can determine whether they overlap.
I am particularly only interested in circles of radius 3, although a generalized formula is suitable.
I have tried simply checking that the Manhattan distance between the centre points is greater than the sum of the radii, but that does not seem to work.