Geometry Basics
- Orientation via cross product
- Line sweep for overlaps
- Closest pair in O(n log n)
1 / 4
Orientation
- cross = (B-A) x (C-A)
- sign tells turn direction
2 / 4
Line sweep
- Convert to events
- Sort, sweep, maintain active count
3 / 4
Closest pair
- Divide and conquer
- Check strip neighbors by y
4 / 4
Use arrow keys or click edges to navigate. Press H to toggle help, F for fullscreen.