I would like some algorithm that I could get from the slope of the semi-circles and their extreme points, to know if they are competing or not.
I would like some algorithm that I could get from the slope of the semi-circles and their extreme points, to know if they are competing or not.
If you have the extreme points you automatically have the slope of the line, but that does not matter because you just have to
((y1_r1 >= y1_r2) == (y2_r1 <= y2_r2)) && ((y1_r1 <= y1_r2) == (y2_r1 >= y2_r2))
If you return True
they are competing.
In this case, y1_r1
is the co-ordinate y
of the end of the line 1 with the lower coordinate x
.