flatsurf / sage-flatsurf

Flat surfaces in Sage
https://flatsurf.github.io/sage-flatsurf/
GNU General Public License v2.0
10 stars 10 forks source link

Simplify creation of translation surfaces #168

Open saraedum opened 2 years ago

saraedum commented 2 years ago

We would like to make it easier to create translation surfaces from elementary polygons by not having to specify all the gluings of a surface but determining them automatically.

There should probably be a function on TranslationSurface (and similarly on Half/DilationSurface):

@classmethod
def create(cls, polygons, genus=None, singularities=None, connected=True, stratum=None, predicate=None, iterate=False):
    r"""
    Return the translation surface obtained by gluing ``polygons``.

    INPUT:

    - ``polygons`` -- a (partially glued) surface or a list of polygons
    - ``genus`` -- if set, the surface is glued to obtain that genus
    - ``singularities`` -- if set, the surface is glued to have that many singularities
    - ``stratum`` -- if set, the surface is glued to be in that stratum
    - ``connected`` -- whether the surface is glued to be connected
    - ``predicate`` -- if set, the surface is glued to satisfy this predicate
    - ``iterate`` -- if true, returns an iterator through the possible surfaces that satisfy the other conditions (nothing fancy here, i.e., no isomorphism checks); if false, returns the single possible surface (an error is raised if there is more than one such surface.)
    """
saraedum commented 2 years ago

@sfreedman67 @slel these are my thoughts about the "wizard" we talked about in Orsay and on 4/26.

Does that look reasonable to you? Feel free to add more conditions that you would find convenient here.

videlec commented 2 years ago
videlec commented 1 year ago

Also, as requested by A. Zorich, it would be convenient to have a generalized version of similarity_surfaces.billiard that also works with surfaces with boundary.