convertHeightmap1Dto2D helper function which allows extracting a subset of a heightma...