Recently, I'm working on a programming assignment related to Geometric intersection. The problem is to count how many intersections can be formed with the following 4 elements:
- Segment; 2) ray; 3) line;4) circle;
The link to the problem: Portal . If you cannot access it, there is the printable PDF: Portal
I've figured out how to deal with line and ray, the way is visualized as the follows:
Visualized image of handling line and ray
In other words, we can preprocess them and treat them as special segments. But I have no idea of how to handle circles. The hint, Circle roads can be broken into a number of arcs, is still unclear to me.