Shape of Curves and Surfaces: the Combinatorics