Wow, this looks to be one of the most interesting series of articles I've ever seen on video games! While I don't know how the code behind this works, I was already well aware that Mario automatically aligns himself with an invisible polygonal plane tangent to a planet's surface below directly below him. That's a mouthful right there, but it just means that there's an invisible, flat plane below Mario, on the ground, at all times. This plane, again, is tangent to the surface polygon directly below Mario.
The gravitational zones, however, are even simpler than Mario's ability to fall towards any curved surface. In that case, there would just be four planes for up, down, left, and right, and Mario would fall towards any depending on his current location.