FA-51597 / Raster clipping / Member archive
Liang barsky parametric rect: integer parameter floor · case 02
Boundary parameters are floor-divided, collapsing fractional intersections to integer parameters.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| explicit case 0 | [["0", "0"]] | [["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 ↗