Gravitational and elastic potential energy