sage-flatsurf: Flat Surfaces in SageMath#

sage-flatsurf is a Python package for working with flat surfaces in SageMath.

We aim for sage-flatsurf to support the investigation of geometric, algebraic and dynamical questions related to flat surfaces. By flat surface we mean a surface modeled on the plane with monodromy given by similarities of the plane, though current efforts are focused on translation surfaces and half-translation surfaces.


The preferred way to install software should be to use your package manager (e.g. apt-get on Debian or Ubuntu, pacman on Arch Linux, brew on MacOS, etc). However, as of this writing, sage-flatsurf has not been picked up by any of the major distributions yet.

We therefore recommend to install sage-flatsurf with the Mamba package manager.

Detailed installation instructions:

If you are planning to work on the sage-flatsurf source code, you can also build sage-flatsurf from source. For this, please have a look at our Developer’s Guide.

A Tour of sage-flatsurf#

Demos of some of the capabilities of sage-flatsurf:

These examples can also be explored interactively by clicking binder. The interactive session might take a moment to start. Once ready, press Shift + Enter to execute the cells, starting from the top.

Module Reference#

The sage-flatsurf source code is split into two packages: graphical which contains plotting logic, and geometry containing everything else. The links below lead to the documentation for the modules that make up these packages with more usage examples and the source code for all the classes and functions implemented in sage-flatsurf. (Note that you can also access this documentation from an interactive SageMath session with ? and ??.