Surface to mesh script in python?

Anyone written one? Can I see it? Can it be done without Ghpython-remote? Is there another way of doing this?
TNX.

Have you checked this example?

Cool, how about the underlying math? Maybe from the ground up? I want to flex some python/geometry skills.