Relationship between gravity, mass, and distance