Updated for sampled height positions.