calculate hight map