FA-51635 / Raster clipping / Member archive
Sutherland hodgman raster rect: right edge pixel center · case 05
The right stage clips at the last pixel center rather than the raster edge, removing the final half pixel of coverage.
Case contract
Each command is a polygon vertex list with exact coordinates. It is clipped in continuous raster coordinates against x>=0, x<=size, y>=0 and y<=size in that order with Sutherland-Hodgman: each stage walks edges from the previous vertex to the current vertex, emits the boundary intersection when entering before the inside vertex, emits the intersection when leaving, and chains its output into the next stage. Boundary points are inside. Cyclically repeated consecutive vertices are then removed; fewer than three remaining vertices yields an empty polygon. Vertices are returned as exact rational strings.
Why this case matters
Raster clipping decides which pixels a primitive may touch; a single wrong clip decision writes outside the target or scissor, or silently drops visible coverage.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| explicit case 2 | [[["1", "1"], ["9", "19/11"], ["9", "13/5"], ["2", "4"]]] | [[["1", "1"], ["10", "20/11"], ["10", "12/5"], ["2", "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 ↗