Skip to main content

Dynamics on surfaces

Project description

The surface_dynamics package for SageMath adds functionality related to interval exchange transformations, translation surfaces, mapping classes and more. It is distributed as an external Python package. It installs on top of an existing Sage installation (tested on versions 8.0, 8.1 and 8.2).

This package is based on SageMath and relies heavily on:

  • gmp or mpir for arbitrary precision arithmetic
  • PARI/GP for number field computations
  • GAP for finite groups representation and permutation groups
  • PPL (Parma Polyhedra Library) and LattE (Lattice point Enumeration) for polytope computations


Installing surface_dynamics requires a working Sage installation (with Cython and gcc). It is also recommanded to install the optional SageMath packages gap_packages, database_gap and latte_int.


The module is distributed on PyPI. You just need to run the following command:

$ sage -pip install surface_dynamics [--user]

The –user option is optional and allows to install the module in your user space (and does not require administrator rights).


After installing surface_dynamics, check that it works by launching Sage and typing the following commands. You should get the same output as below.:

sage: from surface_dynamics.all import *
sage: o = Origami('(1,2)','(1,3)')
sage: o
sage: o.sum_of_lyapunov_exponents()
sage: o.lyapunov_exponents_approx()    # abs tol 0.05
sage: o.veech_group()
Arithmetic subgroup with permutations of right cosets
sage: q = QuadraticStratum(1,1,1,1)
sage: q.orientation_cover()
sage: q.components()
sage: c = q.components()[0]
sage: c
sage: c.orientation_cover_component()

sage: AbelianStrata(genus=3).list()
[H_3(4), H_3(3, 1), H_3(2^2), H_3(2, 1^2), H_3(1^4)]

sage: O = OrigamiDatabase()
sage: q = O.query(("stratum","=",AbelianStratum(2)), ("nb_squares","=",5))
sage: q.number_of()
sage: for o in q:
....:     print("%s\n- - - - - - - -" % o)
- - - - - - - -
- - - - - - - -
sage: Q12_reg = QuadraticStratum(12).regular_component()
sage: Q12_reg.lyapunov_exponents_H_plus(nb_iterations=2**20)   # abs tol 0.05
[0.6634, 0.4496, 0.2305, 0.0871]
sage: Q12_reg.lyapunov_exponents_H_minus(nb_iterations=2**20)  # abs tol 0.05
[1.0000, 0.3087, 0.1192]

Installing development version. Source code

The development webpage is

Assuming you have the program git on your computer, you can install the development version with the command:

$ sage -pip install git+ [--user]


Your comments and help are welcome: For problems with Mac OS X:


  • Vincent Delecroix: maintainer
  • Samuel Lelièvre: contribution for origamis and permutation representative of quadratic strata
  • Charles Fougeron: Lyapunov exponents for strata coverings


  • flatsurf 0.4.0 was released on 2018-05-14 (as a Python package on PyPI)
  • flatsurf 0.3 was released on 2017-08-11 (as a Python package on PyPI)
  • flatsurf 0.2 was released on 2015-11-15 (as a Sage spkg).
  • flatsurf 0.1 was released on 2015-07-30 (as a Sage spkg).

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
surface_dynamics-0.4.0.tar.gz (11.4 MB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page