added hotkey 'R' to adjust the resolution of the terrain mesh
fixed weight formula