Drag the orange line endpoints. Watch the perpendicular foot, the half-chord, and the 0/1/2 points update live.
Count = sign of r² − d² (same as the discriminant Δ):
d>r → 0, d=r → 1, d<r → 2.
| Operation | Time |
|---|---|
| distance C→line (count) | O(1) |
| foot + half-chord (points) | O(1) |
| quadratic / discriminant | O(1) |
| ray vs n circles (naive) | O(n) |
| ray vs n circles (BVH) | ~O(log n) |