l_infinity_delaunay_cells

Cells for the L-infinity Delaunay triangulation.

Each cell of the L-infinity Delaunay triangulation can be identified with a marked triangulation. The marking corresponds to the position of the horizontal and vertical separatrices. Each triangle hence get one of the following types: bottom-left, bottom-right, top-left, top-right.

class flatsurf.geometry.l_infinity_delaunay_cells.LInfinityMarkedTriangulation(num_faces, edge_identifications, edge_types, check=True)[source]

EXAMPLES:

sage: from flatsurf.geometry.l_infinity_delaunay_cells import \
....:     V_NONE, V_BOT, V_TOP, V_RIGHT, V_LEFT, LInfinityMarkedTriangulation

sage: gluings = {(0,0):(1,2), (1,2):(0,0), (0,1):(1,0), (1,0):(0,1),
....:            (0,2):(1,1), (1,1):(0,2)}
sage: types = [(V_BOT, V_NONE, V_RIGHT), (V_NONE, V_LEFT, V_TOP)]
sage: T = LInfinityMarkedTriangulation(2, gluings, types)
barycenter()[source]

Return the translation surface in the barycenter of this polytope.

EXAMPLES:

sage: from flatsurf.geometry.l_infinity_delaunay_cells import \
....:     V_NONE, V_BOT, V_TOP, V_RIGHT, V_LEFT, LInfinityMarkedTriangulation

sage: gluings = {(0,0):(1,2), (1,2):(0,0), (0,1):(1,0), (1,0):(0,1),
....:            (0,2):(1,1), (1,1):(0,2)}
sage: types = [(V_BOT, V_NONE, V_LEFT), (V_NONE, V_RIGHT, V_TOP)]
sage: T = LInfinityMarkedTriangulation(2, gluings, types)
sage: S = T.barycenter()
sage: S.polygon(0)
Polygon(vertices=[(0, 0), (3/7, 13/21), (-3/7, 11/21)])
sage: S.polygon(1)
Polygon(vertices=[(0, 0), (6/7, 2/21), (3/7, 13/21)])
bottom_top_pairs()[source]

Return a list (p1,e1,p2,e2).

EXAMPLES:

sage: from flatsurf.geometry.l_infinity_delaunay_cells import \
....:     V_NONE, V_BOT, V_TOP, V_RIGHT, V_LEFT, LInfinityMarkedTriangulation

sage: gluings = {(0,0):(1,2), (1,2):(0,0), (0,1):(1,0), (1,0):(0,1),
....:            (0,2):(1,1), (1,1):(0,2)}
sage: types = [(V_BOT, V_NONE, V_RIGHT), (V_NONE, V_LEFT, V_TOP)]
sage: T = LInfinityMarkedTriangulation(2, gluings, types)
sage: T.bottom_top_pairs()
[(0, 0, 1, 2)]
num_edges()[source]
num_faces()[source]
opposite_edge(p, e)[source]
polytope()[source]

Each edge correspond to a vector in RR^2 (identified to CC)

We assign the following coordinates

(p,e) -> real part at 2*(3*p + e) and imag part at 2*(3*p + e) + 1

The return polyhedron is compact as we fix each side to be of L-infinity length less than 1.

right_left_pairs()[source]

Return a list (p1,e1,p2,e2)

EXAMPLES:

sage: from flatsurf.geometry.l_infinity_delaunay_cells import \
....:     V_NONE, V_BOT, V_TOP, V_RIGHT, V_LEFT, LInfinityMarkedTriangulation

sage: gluings = {(0,0):(1,2), (1,2):(0,0), (0,1):(1,0), (1,0):(0,1),
....:            (0,2):(1,1), (1,1):(0,2)}
sage: types = [(V_BOT, V_NONE, V_LEFT), (V_NONE, V_RIGHT, V_TOP)]
sage: T = LInfinityMarkedTriangulation(2, gluings, types)
sage: T.right_left_pairs()
[(1, 1, 0, 2)]
flatsurf.geometry.l_infinity_delaunay_cells.bottom_top_delaunay_condition(dim, p1, e1, p2, e2)[source]

Delaunay condition for bottom-top pairs of triangles

flatsurf.geometry.l_infinity_delaunay_cells.opposite_condition(dim, i, j)[source]

encode the equality \(x_i = -x_j\)

EXAMPLES:

sage: from flatsurf.geometry.l_infinity_delaunay_cells import \
....:     opposite_condition, sign_and_norm_conditions

sage: eq1 = opposite_condition(2, 0, 1)
sage: eq2 = opposite_condition(2, 1, 0)

sage: ieqs1 = sign_and_norm_conditions(2, 0, 1)
sage: ieqs2 = sign_and_norm_conditions(2, 1, -1)

sage: sorted(Polyhedron(eqns=[eq1], ieqs=ieqs1).vertices_list())
[[0, 0], [1, -1]]
sage: sorted(Polyhedron(eqns=[eq1,eq2], ieqs=ieqs1).vertices_list())
[[0, 0], [1, -1]]
sage: sorted(Polyhedron(eqns=[eq1,eq2], ieqs=ieqs1+ieqs2).vertices_list())
[[0, 0], [1, -1]]
flatsurf.geometry.l_infinity_delaunay_cells.right_left_delaunay_condition(dim, p1, e1, p2, e2)[source]

Delaunay condition for right-left pairs of triangles

flatsurf.geometry.l_infinity_delaunay_cells.sign_and_norm_conditions(dim, i, s)[source]

Inequalities:

if \(s=+1\), encode the inequalities \(+1 >= x_i >= 0\) if \(s=-1\), encode the inequalities \(-1 <= x_i <= 0\)

EXAMPLES:

sage: from flatsurf.geometry.l_infinity_delaunay_cells import sign_and_norm_conditions

sage: sorted(Polyhedron(ieqs=sign_and_norm_conditions(1, 0, 1)).vertices_list())
[[0], [1]]
sage: sorted(Polyhedron(ieqs=sign_and_norm_conditions(1, 0, -1)).vertices_list())
[[-1], [0]]

sage: ieqs = []
sage: ieqs.extend(sign_and_norm_conditions(2, 0, 1))
sage: ieqs.extend(sign_and_norm_conditions(2, 1, -1))
sage: sorted(Polyhedron(ieqs=ieqs).vertices_list())
[[0, -1], [0, 0], [1, -1], [1, 0]]