# Cast native cone rays against edges filed by angle · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/099426a547f77f1caea0db1c3f260437e8696b63)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: 099426a547f77f1caea0db1c3f260437e8696b63

Requested commit: 099426a547f77f1caea0db1c3f260437e8696b63

Commit: 099426a547f77f1caea0db1c3f260437e8696b63

Tree: 16b23c6beac7d33369cb6b499fcfe98586870a96

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Cast native cone rays against edges filed by angle

Port the Dart query's _ConeBins to the native library. A query now walks
the edge tree nearest node first, files each edge it may see into angular
bins, proves each bin's depth from runs of ring edges crossing it, and
skips nodes, edges and corners that lie provably behind those depths. Each
ray then tests only its own bin's edges, nearest first.

Outlines are bitwise the same as a literal port of the Dart query, and the
cone oracle finds no shape a reference ray disagrees with on all 26 map
sides. Rays drop about 2.5x and edge tests about 15x; the oracle's p99 goes
from 3.5 ms to 1.6 ms. Ray casting is now about a tenth of the query, so
the thread pool and its priority boost are gone and the query runs on the
calling thread.

Box culling reads the two silhouette corners of a box rather than all four
around its centre: the same span for two atan2 calls instead of five.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

```

## Parents

- [532aa7a367ea2f430ed481fc2fdacdf93f51874b](https://git.cafe/dara/icarus/commit/532aa7a367ea2f430ed481fc2fdacdf93f51874b?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/099426a547f77f1caea0db1c3f260437e8696b63?format=markdown)
