First, we compute (an approximation to) the C1 discontinuitites in the surface and use this information to partition the surface. This is done using topological computations in the Chains algebraic-topological computer language.
Chains is a computer language developed by Rick Palmer as part of the SimLab Project. The basic data structures are geometric and topological objects such as vertices, cells, cell complexes, chains, and cochains.