FAILURE MAP
← Case archive

FA-51642 / Raster clipping / Member archive

Sutherland hodgman raster rect: degenerate output · case 02

Clipped polygons that collapse to a point or a segment are emitted as polygons.

Member previewVariant 2 · 3 implementations · 12 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
explicit case 6[[["0", "1"], ["0", "3"]]][[]]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 ↗