Hi everyone,
I have a java method public static String circleRelation( double x1, double y1, double r1, double x2, double y2, double r2) that - given two circles in the plane - will decide whether those circles (1) encircle each other, (2) intersect, (3) touch or (4) are totally seperate. The method returns a String which describes the relationship between those circles, e.g.:
The first circle encircles the second circle
The circles intersect
The circles touch each other
The circles are seperate
Do you have any sample codes to write especially about circles intersect?
I have a java method public static String circleRelation( double x1, double y1, double r1, double x2, double y2, double r2) that - given two circles in the plane - will decide whether those circles (1) encircle each other, (2) intersect, (3) touch or (4) are totally seperate. The method returns a String which describes the relationship between those circles, e.g.:
The first circle encircles the second circle
The circles intersect
The circles touch each other
The circles are seperate
Do you have any sample codes to write especially about circles intersect?
Comment