possible = (aw, ah) =>
d3
.cross(d3.range(1, 11), d3.range(2, 11))
.map(([columns, rows]) => {
const w = Math.floor(4096 / columns);
const h = Math.round((w / aw) * ah);
return {
n: columns * rows,
columns,
rows,
w,
h,
r: w * h,
ppi: w/aw,
width: columns * w,
height: rows * h
};
})
.filter(({ height }) => height <= 4096)