Low Dimensional Topology

August 24, 2009

SnapPy: Computing with hyperbolic 3-manifolds for fun and profit

Filed under: 3-manifolds,Hyperbolic geometry — Nathan Dunfield @ 3:16 pm

This post is so Marc Culler and I can announce SnapPy, a computer program for studying hyperbolic structures on 3-manifolds. It is based on Jeff Weeks’ SnapPea kernel from his very influential program of the same name, written in the early 1990s for Macintosh computers. While Jeff’s program doesn’t work (except in emulation) on any computer you can buy today, SnapPy runs on Mac OS X, Linux, and Windows. SnapPy combines a link editor and 3D-graphics for Dirichlet domains and cusp neighborhoods with a powerful command-line interface based on the Python programming language.

You can download it here, and we put some effort in making it trivial to install for OS X and Windows, and reasonably easy on Linux. There are screenshots of it in action, or you can watch an 11-minute tutorial on YouTube. Unlike previous Python interfaces to the SnapPea, this one has decent documentation and also useful graphics. SnapPy can also be used within my favorite general purpose mathematical software package Sage and has some extra features there for dealing with finite covers.

SnapPy was written by Marc Culler and myself, using Jeff’s kernel code, and today we released version 1.0 (superseding 1.0a and 1.0b). If you successfully install SnapPy, or installed it earlier this summer, leave a note in the comments mentioning what type of system you’re using. (We test it on seven or eight different setups, but you never know what happens out there in the wild.) Enjoy!



  1. […] Read this article: SnapPy: Computing with hyperbolic 3-manifolds for fun and profit … […]

    Pingback by SnapPy: Computing with hyperbolic 3-manifolds for fun and profit … | HiTechBooks — August 24, 2009 @ 9:59 pm | Reply

  2. I’ve downloaded it, and it seems to work fine on Fedora 11 (x86_64), though I haven’t really done any serious computations with it…

    Comment by Emmanuel Kowalski — September 11, 2009 @ 7:57 pm | Reply

    • Actually, if it starts up and the graphics features work, then you’re very unlikely to have any additional problems doing serious computations. The kernel itself is pretty much self-contained, but the interface can be affected by which versions of Tk, OpenGL, etc. that one has…

      Comment by Nathan Dunfield — September 12, 2009 @ 9:23 am | Reply

  3. Nice job! It’s great to have the cusp nbhd and Dirichlet domain views on a linux machine.

    I notice on my office computer (Ubuntu 9.04) it’s impossible to have both up simultanously — the Dirichlet domain view freezes the prompt in the text interface to SnapPy. On my laptop (Ubuntu 8.04), it only freezes the prompt if the Dirichlet domain is animated. So I can bring both views up on the laptop, then animate the Dirichlet domain view.

    I suspect this is mostly a graphics card + driver issue. The PLink editor, the Dirichlet Domain Viewer and the cusp neighborhood viewer appear to not be separate threads, and that’s causing some kind of bottleneck.

    Comment by Ryan Budney — September 29, 2009 @ 10:44 pm | Reply

    • On any platform, you can’t type in the text window when the Dirichlet domain is spinning, though you should be able to once you stop rotating it. However, we weren’t aware of the bug of not having both the cusp neighborhoods and dirichlet domains up at the same time — that appears to be specific to that particular Linux distro. On my Ubuntu 9.04 test image, I can’t reproduce it exactly, but I get some other related bad behavior (I can start up both windows, and then everything stops working). We’ll see if we can fix the problem…

      Comment by Nathan Dunfield — September 29, 2009 @ 11:03 pm | Reply

      • To follow up on this, Marc has fixed the issue of being able to type while the DIrichlet window is spinning, and this will appear in the next update of SnapPy.

        The other issue, with Ubuntu 9.04, is more subtle, and we think it’s caused by the fact that Ubuntu 9.04 uses Xorg 1.6 rather than Xorg 1.5 (Fedora 11 exhibits the same issue and also uses Xorg 1.6). In particular, we’ve managed to exclude the versions of Python and Tk from being the issue (Ubuntu 9.04 upgrades both of those over 8.10 as well), and the problem can be exhibited in the “gears.tcl” example of the Togl subcomponent of SnapPy. At this point, there’s probably not much we can do except wait for Xorg to be fixed — many of the known issues with Ubuntu 9.04 relate to this…

        Comment by Nathan Dunfield — October 3, 2009 @ 9:48 am

  4. Very nice, many thanks to both of you. Everything works fine on my MacBook.

    Comment by Bruno Martelli — October 7, 2009 @ 5:46 am | Reply

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: