Support polygons and the resolution of modular functional singularities