# How can can I find out if the two disks intersect in the plane? [closed]

. Imagine two disks on the xy plane. Each disk is represented by three numbers (the radius, the x coordinate of the center and the y coordinate of the center). All values for this problem are real numbers. Your task is to determine if the two disks intersect.

• What have you tried? What research have you done? What approaches have you considered? We expect you to make a significant effort to research your problem before asking, and to tell us in the question research you've done. – D.W. Sep 28 '15 at 3:56
• This seems to be a problem purely of plane geometry. What computational aspect are you looking for? – David Richerby Sep 28 '15 at 6:14
• What does a comparison of (1) the distance between the two centers and (2) the sum of the two radii tell you? Drawing some pictures might help. – Rick Decker Sep 28 '15 at 13:59

Let the first disk be $D_1 = \langle R_1, (x_1, y_1)\rangle$ and the second disk be $D_2 = \langle R_2, (x_2, y_2)\rangle$, where $R_1$ and $R_2$ is the radius of the first and second disk respectively, as well as $(x_1, y_1)$ and $(x_2, y_2)$ is the center of the first and second disk respectively. Further, let $d$ be the distance of the two centers; that is, $$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}.$$ Then, the two disks intersect if $$d \leq R_1 + R_2$$ and do not intersect otherwise.
Note that if $d = R_1 + R_2$, then the two disks have only one point in common.