What the painters were given

Stream 6: stippling

notes/stipple.md · 237 lines · Notes

Given to 7 painters:

Stream 6: stippling

Friedrich stippled his skies, mist and distant hills, which "enhance[s] the transparency and light scattering" [NG p.56]. His smooth gradations come from stippling and from thin paint pooling in the ground texture, not from thick blending [CATS p.127] (notes/research/friedrich_materials.md §6, table line ~105). All three fresh painters tried stippling and dropped it. This stream makes it a real technique: many small touches of a brush tip, each simulated through the bristles.

What changed

bristle.rs: a touch primitive (Touch, Canvas::touch, touch_on, touch_footprint) and Tool::stippler. Before this, a "dab" was a tiny Gesture drag. That had four problems:

A touch is a vertical press/hold/lift (4 steps, more if the hand drifts):

exchange gained a dep: Option<f32> (fixed deposit volume). Drags pass None, so stroke behavior and the golden are unchanged.

stipple.rs (new): Stipple builder + Canvas::stipple(mask, &Stipple, seed).

Color: one integration point. Stipple::paint_for(want, seen, coverage, …) is the only place stippling chooses paint. When the color stream's substrate-aware Palette API lands, call it there (with coats = touch_coats() × max(coverage, 1)). Until then a clearly marked WORKAROUND does the following:

API

use paint::{Stipple, Tool, Touch};

// one touch by hand
let mut b = Held::new(Tool::stippler(2.0), 1);
b.load(pal.paint(hex("#c8d0dc"), 0.5), 0.5);
c.touch(&mut b, &Touch::at(400.0, 120.0).pressure(0.6).drag(0.3, 0.0).twist(0.4), None);

// a sky: lay-in, then two stipple passes
let s1 = Stipple::new(Tool::stippler(3.0))      // ~1 mm marks on a 440 mm canvas
    .mixed(pal, 0.45).color(sky)                  // aimed at the result on the canvas
    .coverage(|_, _| 2.2)                         // touches per point (tone by density)
    .pressure(0.5, 0.85)                          // mark-size variation
    .dips(20, 0.4, 0.5);                          // touches per dip, load, wipe
c.stipple(&sky_mask, &s1, 12);                    // into the wet lay-in: fuses
c.dry();
let s2 = Stipple::new(Tool::stippler(1.6)).mixed(pal, 0.5).color(glow)
    .coverage(|_, y| 2.2 * smoothstep(100.0, 390.0, y)).dips(24, 0.35, 0.6);
c.stipple(&sky_mask, &s2, 13);

// mist over a dry ridge: a veil built by density, not aimed per dot
let mist = Stipple::new(Tool::stippler(2.2)).mixed(pal, 0.7).color(|_, _| hex("#c3c4bf"))
    .coverage(mist_cov).aim(false).dips(16, 0.3, 0.7);

Other knobs:

Mark size ≈ 0.8 × tool width at mid pressure.

Evidence

cargo paint study_stipple (1000px) and -- --full (3200px) write out/study_stipple.png and out/study_stipple_full.png. JPEG views and crops are in [local path redacted]: study_1000.jpg, study_3200.jpg, crop1000_sky.jpg vs crop3200_sky.jpg (the same 200-unit square), crop3200_strips.jpg, crop3200_loupe.jpg and crop3200_mist.jpg.

The sheet has four parts:

Timings (release, shared 10-core machine under load from 4 other agents):

pass touches 1000px total (aim part) 3200px total (aim part)
sky pass 1 (stippler 3, cov 2.2) 176,897 2.8 s (1.9 s) 5.2 s (2.5 s)
sky pass 2 (stippler 1.6, cov ≤ 2.2) 212,743 1.6 s (0.8 s) 4.4 s (1.8 s)
mist (stippler 2.2, cov ≤ 3, no aim) 160,377 0.7 s 2.4 s

Timings vary about 2× with the load from the other agents. The "aim part" is the serial KM-aim palette search (900–1,050 recipes) inside the workaround. The touches themselves take about 2–3 s for a full sky pass at 3200px. The whole 3200px study runs in 42–58 s, most of it the Handling lay-in and ridge.

What I saw, judged as a painter:

Tests (cargo test -p paint, all pass; golden unchanged)

The new tests live in stipple.rs (the shared tests.rs is untouched):

Fade and relative color (round 3, branch fixes-paint)

Amnesia round 2 (coast #9, mountains #10): a stipple lighter than its field, or a mist over a dark, read as salt or static where it thinned.

The paint_for workaround described above was replaced earlier by Palette::aim (the code calls it; the old text is kept for history).

Evidence: study_stipple at 1000px, base vs this branch: [local path redacted] and the mist fringe crop fringe_cmp.jpg (base on top). There are fewer isolated pale specks in the dark above the mist, and the tone thins more gradually. The dense body of the mist is still grainy up close; stipple over a dark still reads best as a light veil laid by brush and fused.

Known issues / next

Source