I have a polar plane relative to a base point (colored green in the diagram below). The points and segments are represented thus:
class Node {
int theta;
double radius;
}
class Segment {
//each segment must have node that is northern relative to other
Node northern;
Node southern;
}
I want to figure out if the red line going from the base point to each segment node intersects any other segment. In this example, the red line does intersect.
What algorithmic approach should I apply? Computational complexity is less important than simplicity of implementation.