Electron-density distribution in diamond, silicon and germanium under high pressure