Generator

Insertion sort on 24 random elements, 6 moments from one run

Rendered here at the parameters it defaults to, with every essay that calls it — which is the same list as the blast radius of changing it.
Insertion sort on 24 random elements, 6 moments from one runEach panel is the array as it actually stood after a particular write, sampled evenly across the 159 writes the run performed. The comparison counter beside each panel is the counter at that instant, so the picture and the numbers come from the same execution. The run finished at 157 comparisons and 0 swaps.after 0 writes0 cmpafter 32 writes32 cmpafter 64 writes63 cmpafter 95 writes94 cmpafter 127 writes125 cmpafter 159 writes157 cmprandom input, seed stated in lib/count.js157 comparisons in this run

Insertion sort on 24 random elements, 6 moments from one run

Each panel is the array as it actually stood after a particular write, sampled evenly across the 159 writes the run performed. The comparison counter beside each panel is the counter at that instant, so the picture and the numbers come from the same execution. The run finished at 157 comparisons and 0 swaps.

Drawn at 700 × 312, wide on the page. Everything above is what sort-trace returns with no arguments; the caption is the generator's own, computed from the numbers in the drawing rather than written beside it.

2 essays call sort-trace. The drawing above is what it returns with no arguments at all; every call below passes it something, because a placement that passes nothing draws whichever member of the family the generator happens to default to rather than the one its essay argues about — which is what optcheck and figfill exist to catch.

Where it is called

Changing this generator changes every one of these figures.

The library, page 4 of 5 — where sort-trace sits