let
of_1d width height index =
index / height, index
mod
height