part2 = {
const start = String([500, 0]);
const floor = d3
.range(width[0] - 1000, width[1] + 1000)
.map((x) => [x, height]);
const rest = new d3.InternSet([...rock, ...floor], String);
let i = 0, final;
do {
rest.add((final = pour([500, 0], rest)));
if (i++ % 1000 === 0) yield { final, rest, i };
} while (final && String(final) !== start);
yield { final, rest, i };
}