Generator for grammar 002: grid compositions with exact multiply overprint#1
Merged
Conversation
…ly overprint - generator/grid.py: five sheet-driven primitives on the module grid, seeded free composition (audit 002 §3 dialect space), 4-6 ink subsets from the master set - overprint composited by integer multiply (a*b+127)//255 in flat layers, no anti-aliasing, so every output colour is provably white, an ink, or a pairwise product — the audit's self-verifying arithmetic, byte-checkable - overprint depth capped at 2 (SI-019); composition/density model recorded as dialect freedom (SI-018) - GroundTruth records primitives, inks, overlaps and the primitive counts that will become the primitive_frequency_mix measurement - 15 measurement-based tests; 88 total green
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Milestone 2, Phase 5 — the 2D grid generator for the ISO family grammar (
grammars/iso-002.yaml), consuming the sheet for grid, primitives, master inks and layering rule.(a·b+127)//255with no anti-aliasing, so every pixel in the output is provably white, a lone ink, or a pairwise product. The audit verified this arithmetic to the integer on the real identity; the generator preserves it as a whole-image invariant that tests assert directly.GroundTruthrecords primitives, cells, inks, overlap pairs and per-type counts (the futureprimitive_frequency_mixmeasurement, SI-008).Tests
15 new measurement-based tests (grid autocorrelation at M, stripe run-lengths, exact multiply on every recorded overlap, whole-image colour invariant, determinism). Full suite: 88 passed.
Sample render (12×8 cells, module 72, seed 0): all five primitives, six-ink subset, 16 overlap pairs, multiply products visible where inks cross.