i am trying to a c++ program that will determine if two circles intersect each other. the input will be <x,y> coordinates for the center of each circle followed by the radius of each circle. the output will state whether the circles overlap, don't overlap or tangential(touch each other at one common point)

I can help you with math:

if sqrt( (x1 - x2)^2 + (y1 - y2)^2) > r1 + r2 => circles does not intersects

if --//-- < r1 + r2 => circles does intersects

if --//-- = r1 + r2 => circles are tangential

if sqrt( (x1 - x2)^2 + (y1 - y2)^2) > r1 + r2 => circles does not intersects

if --//-- < r1 + r2 => circles does intersects

if --//-- = r1 + r2 => circles are tangential

Topic archived. No new replies allowed.