FA-87370 / Collision detection broadphase / Member archive
Grid cell index truncates toward zero for negative coordinates · case 05
Boxes straddling the origin share cell 0 with boxes one cell away.
Case contract
solve(boxes, cs): insert each box [id,minx,miny,maxx,maxy] into every grid cell floor(min/cs)..floor(max/cs) inclusive on both axes. Return [sorted unique canonical candidate pairs sharing a cell, total cell insertions, largest bucket size].
Why this case matters
Broadphase stages decide which object pairs ever reach narrowphase; a wrong boundary, ordering or bookkeeping rule silently drops real contacts or floods the solver with false candidates.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| case 1 | [[[5, 31], [5, 32], [5, 33], [31, 32], [31, 33], [32, 33]], 26, 4] | [[[5, 31], [5, 32], [5, 33], [31, 32], [31, 33], [32, 33]], 29, 4] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗