FlatSurf Demo

Warwick EPSRC Symposium on "Computation in geometric topology"

By Pat Hooper whooper@ccny.cuny.edu

This material is based upon work supported by the National Science Foundation under Grant 1500965.

FlatSurf is a SAGE module which works with "flat surfaces" written so far mostly by Vincent Delecroix and P. H. It is developing in random directions depending on our interests, but we would like it to be as helpful as possible for everyone... We welcome other contributors!

To get FlatSurf you first need SAGE. Then you can get FlatSurf by following the directions here on the FlatSurf GitHub page. (Currently we recommend running

sage -pip install git+https://github.com/videlec/sage-flatsurf

to install.)

In [1]:
from flatsurf import *

Veech Group Elements (Affine symmetries)

Veech's double n-gon surfaces:

In [2]:
s = translation_surfaces.veech_double_n_gon(5).canonicalize()
s.plot()
Out[2]:
In [3]:
p=s.polygon(0)
modulus = (p.vertex(3)[1]-p.vertex(2)[1])/(p.vertex(2)[0]-p.vertex(4)[0])
AA(modulus)
Out[3]:
0.3632712640026804?
In [4]:
m = matrix(s.base_ring(),[[1,2],[0,1]])
show(matrix(AA,m))
ss = m*s
ss.plot()
Out[4]:
In [5]:
ss.delaunay_decomposition().plot()
Out[5]:

The following checks that the matrix m stabilizes s:

In [6]:
ss.canonicalize()==s
Out[6]:
False

Geodesics

In [7]:
s = translation_surfaces.veech_double_n_gon(5)

The tangent bundle of the surface:

In [8]:
TB = s.tangent_bundle()

Define a tangent vector in polygon $0$ starting at $(\frac{1}{2},0)$ and pointed in some direction:

In [9]:
direction = s.polygon(0).vertex(2)+3*s.polygon(0).vertex(3)
v=TB(0, (1/2,0), direction)

Convert the vector to a straight-line trajectory.

In [10]:
traj=v.straight_line_trajectory()
In [11]:
s.plot()+traj.plot()
Out[11]:
In [12]:
traj.flow(1000)
print(traj.is_closed())
print(traj.combinatorial_length())
s.plot()+traj.plot()
True
40
Out[12]:

Cone surfaces from polyhedra

Polyhedra are built into SAGE and you can use them to build a translation surface. In this Demo we only use a built in function for a Platonic Solid.

In [13]:
from flatsurf.geometry.polyhedra import *
In [14]:
polyhedron,s,mapping = platonic_dodecahedron()
In [15]:
polyhedron.plot(frame=False)
Out[15]:
In [16]:
s.plot(polygon_labels=False,edge_labels=False)
Out[16]:
In [17]:
TB = s.tangent_bundle()
direction = s.polygon(0).vertex(2)+2*s.polygon(0).vertex(3)
v=TB(0, (1/2,0), direction)
traj=v.straight_line_trajectory()
traj.flow(100)
print(traj.is_closed())
print(traj.combinatorial_length())
True
90
In [18]:
s.plot()+traj.plot()
Out[18]:
In [19]:
polyhedron.plot(frame=False, point=False, line=False, wireframe=None)+line3d(mapping(traj),radius=0.02, frame=False)
Out[19]:
In [20]:
TB = s.tangent_bundle()
direction = s.polygon(0).vertex(2)+3*s.polygon(0).vertex(3)
v=TB(0, (1/2,0), direction)
traj=v.straight_line_trajectory()
traj.flow(1000)
print(traj.is_closed())
print(traj.combinatorial_length())
True
320
In [21]:
show(s.plot()+traj.plot())
In [22]:
p = polyhedron.plot(frame=False, point=False, line=False, wireframe=None)+line3d(mapping(traj),radius=0.02, frame=False)
show(p,viewer='tachyon',frame=False)

Relative period deformations

In [23]:
s = translation_surfaces.veech_2n_gon(5)
s.plot(edge_labels=False,polygon_labels=False)
Out[23]: