dilation_surfaces

The category of dilation surfaces.

This module provides shared functionality for all surfaces in sage-flatsurf that are built from Euclidean polygons that are glued by translation followed by homothety, i.e., application of a diagonal matrix.

See flatsurf.geometry.categories for a general description of the category framework in sage-flatsurf.

Normally, you won’t create this (or any other) category directly. The correct category is automatically determined for immutable surfaces.

EXAMPLES:

sage: from flatsurf import Polygon, similarity_surfaces
sage: P = Polygon(vertices=[(0,0), (2,0), (1,4), (0,5)])
sage: S = similarity_surfaces.self_glued_polygon(P)
sage: C = S.category()

sage: from flatsurf.geometry.categories import DilationSurfaces
sage: C.is_subcategory(DilationSurfaces())
True
class flatsurf.geometry.categories.dilation_surfaces.DilationSurfaces[source]

The category of surfaces built from polygons with edges identified by translations and homothety.

EXAMPLES:

sage: from flatsurf.geometry.categories import DilationSurfaces
sage: DilationSurfaces()
Category of dilation surfaces
class FiniteType(base_category)[source]

The category of dilation surfaces built from a finite number of polygons.

EXAMPLES:

sage: from flatsurf import Polygon, similarity_surfaces
sage: P = Polygon(vertices=[(0,0), (2,0), (1,4), (0,5)])
sage: S = similarity_surfaces.self_glued_polygon(P)

sage: from flatsurf.geometry.categories import DilationSurfaces
sage: S in DilationSurfaces().FiniteType()
True
class ParentMethods[source]

Provides methods available to all dilation surfaces built from finitely many polygons.

If you want to add functionality for such surfaces you most likely want to put it here.

l_infinity_delaunay_triangulation(triangulated=None, in_place=None, limit=None, direction=None)[source]

Return an L-infinity Delaunay triangulation of a surface, or make some triangle flips to get closer to the Delaunay decomposition.

INPUT:

  • triangulated – deprecated and ignored.

  • in_place – deprecated and must be None (the default); otherwise an error is produced

  • limit – optional (positive integer) If provided, then at most limit

    many diagonal flips will be done.

  • direction – optional (vector). Used to determine labels when a pair of triangles is flipped. Each triangle has a unique separatrix which points in the provided direction or its negation. As such a vector determines a sign for each triangle. A pair of adjacent triangles have opposite signs. Labels are chosen so that this sign is preserved (as a function of labels).

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: s0 = translation_surfaces.veech_double_n_gon(5)
sage: field = s0.base_ring()
sage: a = field.gen()
sage: m = matrix(field, 2, [2,a,1,1])
sage: for _ in range(5): assert s0.triangulate().codomain().random_flip(5).l_infinity_delaunay_triangulation().is_veering_triangulated()

sage: s = m*s0
sage: s = s.l_infinity_delaunay_triangulation()
sage: assert s.is_veering_triangulated()
sage: TestSuite(s).run()

sage: s = (m**2)*s0
sage: s = s.l_infinity_delaunay_triangulation()
sage: assert s.is_veering_triangulated()
sage: TestSuite(s).run()

sage: s = (m**3)*s0
sage: s = s.l_infinity_delaunay_triangulation()
sage: assert s.is_veering_triangulated()
sage: TestSuite(s).run()

The octagon which has horizontal and vertical edges:

sage: t0 = translation_surfaces.regular_octagon()
sage: for _ in range(5): assert t0.triangulate().codomain().random_flip(5).l_infinity_delaunay_triangulation().is_veering_triangulated()
sage: r = matrix(t0.base_ring(), [
....:    [ sqrt(2)/2, -sqrt(2)/2 ],
....:    [ sqrt(2)/2, sqrt(2)/2 ]])
sage: p = matrix(t0.base_ring(), [
....:    [ 1, 2+2*sqrt(2) ],
....:    [ 0, 1 ]])

sage: t = (r * p * r * t0).l_infinity_delaunay_triangulation()
sage: systole_count = 0
sage: for l, e in t.edges():
....:     v = t.polygon(l).edge(e)
....:     systole_count += v[0]**2 + v[1]**2 == 1
sage: assert t.is_veering_triangulated() and systole_count == 8, (systole_count, {lab: t.polygon(lab) for lab in t.labels()}, t.gluings())

sage: t = (r**4 * p * r**5 * p**2 * r * t0).l_infinity_delaunay_triangulation()
sage: systole_count = 0
sage: for l, e in t.edges():
....:     v = t.polygon(l).edge(e)
....:     systole_count += v[0]**2 + v[1]**2 == 1
sage: assert t.is_veering_triangulated() and systole_count == 8, (systole_count, {lab: t.polygon(lab) for lab in t.labels()}, t.gluings())
veering_triangulation(l_infinity=False, limit=None, direction=None)[source]

Return a veering triangulated surface, or make some triangle flips to get closer to the Delaunay decomposition.

INPUT:

  • l_infinity – optional (boolean, default False). Whether to return a L^oo-Delaunay triangulation or any veering triangulation.

  • limit – optional (positive integer) If provided, then at most limit

    many diagonal flips will be done.

  • direction – optional (vector). Used to determine labels when a pair of triangles is flipped. Each triangle has a unique separatrix which points in the provided direction or its negation. As such a vector determines a sign for each triangle. A pair of adjacent triangles have opposite signs. Labels are chosen so that this sign is preserved (as a function of labels).

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: s0 = translation_surfaces.veech_double_n_gon(5)
sage: field = s0.base_ring()
sage: a = field.gen()
sage: m = matrix(field, 2, [2,a,1,1])
sage: for _ in range(5): assert s0.triangulate().codomain().random_flip(5).veering_triangulation().is_veering_triangulated()

sage: s = m*s0
sage: s = s.veering_triangulation()
sage: assert s.is_veering_triangulated()
sage: TestSuite(s).run()

sage: s = (m**2)*s0
sage: s = s.veering_triangulation()
sage: assert s.is_veering_triangulated()
sage: TestSuite(s).run()

sage: s = (m**3)*s0
sage: s = s.veering_triangulation()
sage: assert s.is_veering_triangulated()
sage: TestSuite(s).run()

The octagon which has horizontal and vertical edges:

sage: t0 = translation_surfaces.regular_octagon().triangulate().codomain()
sage: t0.is_veering_triangulated()
False
sage: t0.veering_triangulation().is_veering_triangulated()
True
sage: for _ in range(5): assert t0.random_flip(5).veering_triangulation().is_veering_triangulated()

sage: r = matrix(t0.base_ring(), [
....:    [ sqrt(2)/2, -sqrt(2)/2 ],
....:    [ sqrt(2)/2, sqrt(2)/2 ]])
sage: p = matrix(t0.base_ring(), [
....:    [ 1, 2+2*sqrt(2) ],
....:    [ 0, 1 ]])
sage: t = (r * p * r * t0).veering_triangulation()
sage: assert t.is_veering_triangulated()
sage: t = (r**4 * p * r**5 * p**2 * r * t0).veering_triangulation()
sage: assert t.is_veering_triangulated()
class ParentMethods[source]

Provides methods available to all dilation surfaces.

If you want to add functionality for such surfaces you most likely want to put it here.

affine_automorphism_group()[source]

Return the group of affine automorphisms of this surface, i.e., the group of homeomorphisms that can be locally expressed as affine transformations.

EXAMPLES:

sage: from flatsurf import dilation_surfaces
sage: S = dilation_surfaces.genus_two_square(1/2, 1/3, 1/4, 1/5)
sage: A = S.affine_automorphism_group(); A
AffineAutomorphismGroup(Genus 2 Positive Dilation Surface built from 2 right triangles and a hexagon)
is_dilation_surface(positive=False)[source]

Return whether this surface is a dilation surface.

See similarity_surfaces.SimilaritySurfaces.ParentMethods.is_dilation_surface() for details.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.infinite_staircase()

sage: S.is_dilation_surface(positive=True)
True
sage: S.is_dilation_surface(positive=False)
True
is_veering_triangulated(certificate=False)[source]

Return whether this dilation surface is given by a veering triangulation.

A triangulation is veering if none of its triangles are made of three edges of the same slope (positive or negative).

EXAMPLES:

sage: from flatsurf import MutableOrientedSimilaritySurface, Polygon

sage: s = MutableOrientedSimilaritySurface(QQ)
sage: s.add_polygon(Polygon(vertices=[(0,0), (1,1), (-1,2)]))
0
sage: s.add_polygon(Polygon(vertices=[(0,0), (-1,2), (-2,1)]))
1
sage: s.glue((0, 0), (1, 1))
sage: s.glue((0, 1), (1, 2))
sage: s.glue((0, 2), (1, 0))
sage: s.set_immutable()
sage: s.is_veering_triangulated()
True

sage: m = matrix(ZZ, 2, 2, [5, 3, 3, 2])
sage: (m * s).is_veering_triangulated()
False
veech_group()[source]

Return the Veech group of this surface, i.e., the group of matrices that fix the vertices of this surface.

EXAMPLES:

sage: from flatsurf import dilation_surfaces
sage: S = dilation_surfaces.genus_two_square(1/2, 1/3, 1/4, 1/5)
sage: V = S.veech_group(); V
VeechGroup(Genus 2 Positive Dilation Surface built from 2 right triangles and a hexagon)
class Positive(base_category)[source]

The axiom satisfied by dilation surfaces that use homothety with positive scaling.

EXAMPLES:

sage: from flatsurf import translation_surfaces
sage: S = translation_surfaces.square_torus()
sage: 'Positive' in S.category().axioms()
True
class ParentMethods[source]

Provides methods available to all positive dilation surfaces.

If you want to add functionality for such surfaces you most likely want to put it here.

is_dilation_surface(positive=False)[source]

Return whether this surface is a dilation surface.

See similarity_surfaces.SimilaritySurfaces.ParentMethods.is_dilation_surface() for details.

class SubcategoryMethods[source]
Positive()[source]

Return the subcategory of surfaces glued by positive dilation.

EXAMPLES:

sage: from flatsurf.geometry.categories import DilationSurfaces
sage: C = DilationSurfaces()
sage: C.Positive()
Category of positive dilation surfaces
super_categories()[source]

Return the categories that a dilation surfaces is also always a member of.

EXAMPLES:

sage: from flatsurf.geometry.categories import DilationSurfaces
sage: DilationSurfaces().super_categories()
[Category of rational similarity surfaces]