function drawCells() {
const cellWidth = width / numOfCells;
const cellHeight = height / numOfCells;
return cells.reduce((acc, cell) => {
const [u, v, active] = cell;
if (active) {
const x = CSMath.lerp(0, width, u);
const y = CSMath.lerp(0, height, v);
return `${acc}
<rect x="${x - cellWidth / 2}" y="${
y - cellHeight / 2
}" width="${cellWidth}" height="${cellHeight}" fill="${colors.fg}" />
`;
}
return acc;
}, "");
}