research/lab/rs/crop-counts
1 directory and 2 files in research/lab/rs/crop-counts.
Crop Counts
- Regenerates the level tables and the radius sweep on crop: exact shape crops over the carpet and the sponge.
- The remaining crop.md numbers are pinned by
mrlymath::shapetests or derived from the printed lines. - The designs are code 7 at dim 2 (the carpet,
mrlymath::bang::factory::create(7, 3, 2, 2, level)) and code 23 at dim 3 (the sponge,create(23, 3, 3, 2, level)), with level 0 the single filled cell. - The shapes are
mrlymath::shape::namedball and diamond, centered at one half on every axis, classified bymrlymath::shape::censusin exact integer arithmetic, no floats anywhere. - A line prints
filled_inandfilled_cut, the filled cells fully inside and crossing the boundary, andexposed_after, the exposed unit faces ofcrop(types, shape, true)- a face counts as exposed when its neighbour is empty or off the grid. - The level series runs the inscribed radius
1/2at levels0..5in 2D and0..4in 3D; the sweep runs radii1/24 .. 24/24at carpet level 4 (side 81) and sponge level 3 (side 27). - Every line asserts the partition and complement identities before printing: the three filled tallies sum to the design's fill,
cropat eachkeep_cutmatches its census columns, and the crop and theShape::Anticrop with the complementary cut rule partition the filled set exactly, both ways.
RUN
CARGO_BUILD_JOBS=4 cargo run --release -p crop-counts- Under five seconds; prints only, writes nothing.
WITNESSES
- crop.md the carpet level series: cut cells
1, 8, 28, 76, 204, 580and the full ball and diamond tables at level 0..5. - crop.md the sponge level series: cut cells
1, 20, 216, 1224, 7968and the full ball and diamond tables at level 0..4. - crop.md the dead zones: carpet crops empty below
r = 1/6for ball and diamond alike, sponge diamond belowr = 1/3; the sponge ball sweep is empty throughr = 5/24and first cuts atr = 6/24, the first grid radius past the exact contactsqrt(2)/6. - crop.md the saturation radii: the carpet ball crop holds all 4096 cells from
r = 17/24, the sponge ball crop all 8000 fromr = 7/8, and the sponge diamond never saturates in the sweep. - crop.md the partition and complement identities, asserted on all 118 printed configurations.
- src/1 item
- Cargo.toml149 B
- README.md2.2 kB