minimal_cover

EXAMPLES:

Usually, you do not interact with the types in this module directly but call minimal_cover() on a surface:

sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5))

sage: S.minimal_cover("translation")
Minimal Translation Cover of Genus 0 Rational Cone Surface built from 2 right triangles
sage: S.minimal_cover("half-translation")
Minimal Half-Translation Cover of Genus 0 Rational Cone Surface built from 2 right triangles
sage: S.minimal_cover("planar")
Minimal Planar Cover of Genus 0 Rational Cone Surface built from 2 right triangles
class flatsurf.geometry.minimal_cover.MinimalHalfTranslationCover(similarity_surface, category=None)[source]

EXAMPLES:

sage: from flatsurf import MutableOrientedSimilaritySurface, Polygon, similarity_surfaces, polygons
sage: from flatsurf.geometry.minimal_cover import MinimalHalfTranslationCover
sage: s = MutableOrientedSimilaritySurface(QQ)
sage: s.add_polygon(Polygon(vertices=[(0,0),(5,0),(0,5)]))
0
sage: s.add_polygon(Polygon(vertices=[(0,0),(3,4),(-4,3)]))
1
sage: s.glue((0, 0), (1, 2))
sage: s.glue((0, 1), (1, 1))
sage: s.glue((0, 2), (1, 0))
sage: s.set_immutable()
sage: ss = s.minimal_cover("half-translation")
sage: isinstance(ss, MinimalHalfTranslationCover)
True
sage: ss.is_finite_type()
True
sage: len(ss.polygons())
4
sage: TestSuite(ss).run()

The following is to test that unfolding is reasonably fast on the instances reported in https://github.com/flatsurf/sage-flatsurf/issues/47:

sage: T = polygons.triangle(2, 13, 26)
sage: S = similarity_surfaces.billiard(T)
sage: S = S.minimal_cover("half-translation")
sage: S
Minimal Half-Translation Cover of Genus 0 Rational Cone Surface built from 2 triangles
is_mutable()[source]

Return whether this surface is mutable, i.e., return False.

This implements flatsurf.geometry.categories.topological_surfaces.TopologicalSurfaces.ParentMethods.is_mutable().

EXAMPLES:

sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("half-translation")
sage: S.is_mutable()
False
opposite_edge(label, edge)[source]

Return the polygon label and edge index when crossing over the edge of the polygon label.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.opposite_edge().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("half-translation")
sage: S.opposite_edge((0, 1, 0), 0)
((1, 1, 0), 2)
polygon(label)[source]

Return the polygon with label.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.polygon().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("half-translation")
sage: S.polygon((0, 1, 0))
Polygon(vertices=[(0, 0), (1, 0), (1/4*c^2 - 1/4, 1/4*c)])
roots()[source]

Return root labels for the polygons forming the connected components of this surface.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.roots().

EXAMPLES:

sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("half-translation")
sage: S.roots()
((0, 1, 0),)
class flatsurf.geometry.minimal_cover.MinimalPlanarCover(similarity_surface, base_label=None, category=None)[source]

The minimal planar cover of a surface \(S\) is the smallest cover \(C\) so that the developing map from the universal cover \(U\) to the plane induces a well defined map from \(C\) to the plane. This is a translation surface.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: s = translation_surfaces.square_torus()
sage: from flatsurf.geometry.minimal_cover import MinimalPlanarCover
sage: pc = s.minimal_cover("planar")
sage: isinstance(pc, MinimalPlanarCover)
True
sage: pc.is_finite_type()
False
sage: sing = pc.singularity(pc.root(), 0, limit=4)
doctest:warning
...
UserWarning: Singularity() is deprecated and will be removed in a future version of sage-flatsurf. Use surface.point() instead.
doctest:warning
...
UserWarning: limit has been deprecated as a keyword argument when creating points and will be removed without replacement in a future version of sage-flatsurf
sage: len(sing.vertex_set())
doctest:warning
...
UserWarning: vertex_set() is deprecated and will be removed in a future version of sage-flatsurf; use representatives() and then vertex = surface.polygon(label).get_point_position(coordinates).get_vertex() instead
4
sage: TestSuite(s).run()
is_compact()[source]

Return whether this surface is compact as a topological space, i.e., return False.

This implements flatsurf.geometry.categories.topological_surfaces.TopologicalSurfaces.ParentMethods.is_compact().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.square_torus().minimal_cover("planar")
sage: S.is_compact()
False
is_mutable()[source]

Return whether this surface is mutable, i.e., return False.

This implements flatsurf.geometry.categories.topological_surfaces.TopologicalSurfaces.ParentMethods.is_mutable().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.square_torus().minimal_cover("planar")
sage: S.is_mutable()
False
opposite_edge(label, edge)[source]

Return the polygon label and edge index when crossing over the edge of the polygon label.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.opposite_edge().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("planar")
sage: root = S.root()
sage: S.opposite_edge(root, 0)
((1, (x, y) |-> (x, y)), 2)
polygon(label)[source]

Return the polygon with label.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.polygon().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.square_torus().minimal_cover("planar")
sage: root = S.root()
sage: S.polygon(root)
Polygon(vertices=[(0, 0), (1, 0), (1, 1), (0, 1)])
roots()[source]

Return root labels for the polygons forming the connected components of this surface.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.roots().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.square_torus().minimal_cover("planar")
sage: S.roots()
((0, (x, y) |-> (x, y)),)
class flatsurf.geometry.minimal_cover.MinimalTranslationCover(similarity_surface, category=None)[source]

EXAMPLES:

sage: from flatsurf import MutableOrientedSimilaritySurface, Polygon, similarity_surfaces, polygons
sage: from flatsurf.geometry.minimal_cover import MinimalTranslationCover
sage: s = MutableOrientedSimilaritySurface(QQ)
sage: s.add_polygon(Polygon(vertices=[(0,0),(5,0),(0,5)]))
0
sage: s.add_polygon(Polygon(vertices=[(0,0),(3,4),(-4,3)]))
1
sage: s.glue((0, 0), (1, 2))
sage: s.glue((0, 1), (1, 1))
sage: s.glue((0, 2), (1, 0))
sage: s.set_immutable()
sage: ss = s.minimal_cover("translation")
sage: isinstance(ss, MinimalTranslationCover)
True
sage: ss.is_finite_type()
True
sage: len(ss.polygons())
8
sage: TestSuite(ss).run()

The following is to test that unfolding is reasonably fast on the instances reported in https://github.com/flatsurf/sage-flatsurf/issues/47:

sage: T = polygons.triangle(2, 13, 26)
sage: S = similarity_surfaces.billiard(T)
sage: S = S.minimal_cover("translation")
sage: S
Minimal Translation Cover of Genus 0 Rational Cone Surface built from 2 triangles
is_compact()[source]

Return whether this surface is compact as a topological space.

This implements flatsurf.geometry.categories.topological_surfaces.TopologicalSurfaces.ParentMethods.is_compact().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.infinite_staircase().minimal_cover("translation")
sage: S.is_compact()
False
sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("translation")
sage: S.is_compact()
True
is_mutable()[source]

Return whether this surface is mutable, i.e., return False.

This implements flatsurf.geometry.categories.topological_surfaces.TopologicalSurfaces.ParentMethods.is_mutable().

EXAMPLES:

sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("translation")
sage: S.is_mutable()
False
opposite_edge(label, edge)[source]

Return the polygon label and edge index when crossing over the edge of the polygon label.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.opposite_edge().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("translation")
sage: S.opposite_edge((0, 1, 0), 0)
((1, 1, 0), 2)
polygon(label)[source]

Return the polygon with label.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.polygon().

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("translation")
sage: S.polygon((0, 1, 0))
Polygon(vertices=[(0, 0), (1, 0), (1/4*c^2 - 1/4, 1/4*c)])
roots()[source]

Return root labels for the polygons forming the connected components of this surface.

This implements flatsurf.geometry.categories.polygonal_surfaces.PolygonalSurfaces.ParentMethods.roots().

EXAMPLES:

sage: from flatsurf import polygons, similarity_surfaces
sage: S = similarity_surfaces.billiard(polygons.triangle(2, 3, 5)).minimal_cover("translation")
sage: S.roots()
((0, 1, 0),)