Commit Graph
8 Commits
Author SHA1 Message Date
dotCooCoo ff2afe01d8 Merge #658 (fix/linesweeper-sweep-doc-crossing-t) into integration/linesweeper 2026-11-09 13:45:01 -08:00
dotCooCoo 24b2d44641 Merge #647 (fix/linesweeper-sweep-doc-ratio-overflow) into integration/linesweeper 2026-11-09 13:41:26 -08:00
dotCooCoo 78867caa87 linesweeper: the crossing-height bounds in docs/sweep.typ use absolute inverse slopes
Slopes can be negative, so the lemma's bound and the later bound on the crossing height take the absolute values of 1/m_alpha and 1/m_beta, as the proof's inverse-slope bound requires.
2026-11-09 06:11:48 -08:00
dotCooCoo a29a6d4162 linesweeper: the crossing-height proof in docs/sweep.typ divides d by y_1 - y_0
The proof's inverse-slope step divided d by y_1 - y_1, which is zero. The patch notes in SOURCE.json and README.craft.md, and the file's hash, are updated.
2026-11-08 04:45:03 -08:00
dotCooCoo acfedcd148 linesweeper: the crossing height in docs/sweep.typ divides the starting gap
lem-intersection-height-error defined t as the ending gap
alpha(y_1) - beta(y_1) over the sum of both gaps. The gap
beta - alpha between two segments is D0 (1 - t) - D1 t, which is zero
at t = D0 / (D0 + D1), with D0 = beta(y_0) - alpha(y_0) the starting
gap. With D0 = 1 and D1 = 3 the old formula gave t = 0.75, while the
segments cross at t = 0.25. The code in src/curve/line.rs already
divides the starting gap.

The lemma and its proof now use the starting gap as the numerator c,
which also matches the proof's alpha(y) - beta(y) = -c + s d.

SOURCE.json records the patch in local_patches and the new sha256 of
docs/sweep.typ. README.craft.md and NOTICE say one file is changed.
2026-11-06 23:19:28 -08:00
dotCooCoo 7a9fe3a4b2 linesweeper: the left intersection scan in docs/sweep.typ uses alpha^(i+1)
The pseudocode for the intersection scan to the left looped j = i down
to 1 and compared each alpha^j with alpha^i, so its first pass compared
alpha^i with itself. The lemma after it is stated for alpha^(i+1), the
segment being inserted to the right of alpha^i. The loop body now uses
alpha^(i+1), and w^j is the smallest event height between j and i+1.

SOURCE.json records the patch in local_patches and the new sha256 of
docs/sweep.typ. README.craft.md and NOTICE say one file is changed.
2026-11-06 23:00:31 -08:00
dotCooCoo 5427cd7b2d linesweeper: the ratio lemma assumes a finite, nonzero denominator
The accuracy lemma for (y - y0) / (y1 - y0) said that y0 <= y <= y1 rules
out overflow. It does not: with y0 = -1e308, y = 0 and y1 = 1e308,
y1 - y0 rounds to infinity and the computed ratio is 0 instead of 1/2.
The lemma now assumes y0 < y1 and a finite fl(y1 - y0), and its proof
bounds fl(y1 - y0) where it wrote fl(y + y0). The x-coordinate accuracy
lemma that uses it takes M as a floating-point number and shows both
assumptions hold for a segment that is not horizontal.

README.craft.md and SOURCE.json record the change.
2026-11-06 22:17:39 -08:00
dotCooCoo f14cc7f21e linesweeper: keep a copy of the crates.io 0.5.0 package in vendor/
Add the linesweeper 0.5.0 package to vendor/ with no file changed, so
that a fix to it can reach the Craft apps through this repository
without waiting for a linesweeper release. The GitHub repository its
manifest names is archived, and its README says development moved off
GitHub.

Leave out the test font (fonts live in craft-fonts), the logo artwork,
the snapshot images and the package's repository tooling. SOURCE.json
lists each with its hash.

Add a workspace exclude, a [patch.crates-io] entry, SOURCE.json with
the archive hash and per-file hashes, NOTICE and ATTRIBUTION.md rows,
and the package's tests in the backend test script. craft-prepress's
flatten feature now builds against the copy, so Cargo.lock drops the
package's registry source and checksum.
2026-11-06 19:05:18 -08:00