FAILURE MAP
← Case archive

FA-51577 / Raster clipping / Member archive

Liang barsky parametric rect: entry classified by distance · case 02

Boundaries are classified as entering or leaving by the sign of the boundary distance instead of the direction term, so interior starts treat every plane as leaving.

Member previewVariant 2 · 3 implementations · 13 checks per implementation

Case contract

Each command is [x0,y0,x1,y1,rect] with integer coordinates and an inclusive integer rectangle [left,top,right,bottom] that is first intersected with the pixel-center raster [0,size-1]x[0,size-1]. An empty rectangle returns None. Liang-Barsky tests left, right, top and bottom inequalities with exact rational parameters: parallel segments outside a boundary are rejected, points on a boundary are inside, entering parameters raise t0 and leaving parameters lower t1. The result is [t0,t1] as exact rational strings or None.

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 0[null][["1/5", "4/5"]]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 ↗