Four centuries ago, Newton showed that the gravitational field of a perfectly spherical object is equivalent to that of a point. In other words, if you pretend that the Earth is spherically symmetric (which is a really good approximation), then, if you want to know the net gravitational effect that comes from this massively complex system made up of about elementary particles–each one with its own mass creating its own gravitational field–it suffices to consider the gravitational effect of a single particle. (Admittedly, you need to consider a single particle that weighs 6,000,000,000,000,000,000,000,000 kilograms.) In other words, the gravitational field is simply given by , where k is a constant and r is the distance from the center of the Earth. (Extending this model to include points within the Earth is easy as well.)
This idea is enormously powerful. It takes a problem that our most powerful computers couldn’t even contemplate and converts it cleanly into a problem that everyone solves as a freshman in high school. Indeed, physicists are so enamored with spherical approximations that they get mocked regularly for it.
So, to act like a caricature of a theoretical physicist for a minute, let’s pretend that the Earth is indeed perfectly spherically symmetric and that it’s the only object in the universe. And, say we only care about gravity in this world. In this fabled universe, it’s not too hard to imagine building a computer that perfectly represents the effects of gravity everywhere in the universe. A user of this computer could enter coordinates and a desired level of accuracy and learn the strength and direction of the gravitational field at those coordinates within the requested level of accuracy. It is even conceivable that this computer could itself be a sphere of uniform density, centered around the center of the earth, so that the computer could easily consider its own gravitational effects as well. (Or, the density of the material from which the computer is constructed at a given distance from the Earth’s center could be the same as all other matter at that distance. E.g., the computer could be as dense as rock and inside the Earth or as dense as air and in the atmosphere.)