Optimize earth(height) with Nelder-Mead method.