Modeling Surface Diagrams


I’m currently at MSRI at a knot homology meeting. There are lots of people here with pictures of surfaces, some of these even being categorical, so I thought I would return to the subject of computer manipulation of these. In particular I thought I would make use of our (hopefully) brief sojourn at WordPress and take the opportunity to embed some videos.

In my paper A diagrammatic approach to Hopf monads I had lots and lots of surface diagrams — these are the one-dimension higher version of string diagrams which can be useful for notating morphisms in monoidal 2-categories or 3-categories. So I had to draw a hundred or so pictures like this one.

A surface diagram

A surface diagram involving a Hopf monad

[I hope to write something more about Hopf monads at the café at some point very soon.]

I drew all of these pictures in xfig — a standard 2-dimensional drawing package in which you have to do all of the 3-d stuff by eye and can’t do any fancy shading or anything. It would be really nice if I could actually create these as 3-d objects and then just export some projection of them, possibly suitably ray traced. I had an attempt at creating some categorical surfaces using blender, which is a splendid piece of open source software which you can use to make movies like Shrek or Monsters Inc. Here are two of my efforts.

The first represents the associator natural transformation in a monoidal category (see the Hopf monads paper linked above for the details).

The second is the so-called swallowtail relation (see Figure 25 on page 40 of HDA4).

As well making movies with such models you can also embed the 3d model in to pdf files and, provided you’re using acrobat 😦 your readers can rotate the surface for themselves. Here’s an example from meshlab.

Whilst this is all well and good, there are at least two things I would like to be able to do that I currently can’t.

  • Draw on the surfaces. I want to be able to draw what are essentially morphisms, like in the Hopf monad picture above, and also to be able to label them.
  • Integrate with mathematics software such as sage or maple, or possibly even with some scripting language such a python. Then I wouldn’t have to input the surfaces with a mouse incredibly slowly in blender, but would be able to somehow code up the surfaces.

One thing to note is that these “surfaces” can be singular, as in the associator example above, so are not so easy to handle in standard packages with tend to expect non-singular things.

So, has anyone else tried using 3d software for modeling surface diagrams?

8 Responses to “Modeling Surface Diagrams”

  1. Jacques Distler Says:

    You have always been able to embed YouTube videos. You just have to do it right.

  2. bane Says:

    I don’t know this is helpful or not, but one tool that you might use is MATLAB. One of the (in this case) advantages of MATLAB is that it has a relatively flexible visualisation framework which assumes that inputs are actually matrices defining a surface mesh (which it’ll interpolate in a reasonable non-problem specific way) which you generate separately (ie, to do parametric plotting you create the discrete mesh of samples yourself then get it displayed). This is an advantage because you can explicitly control what gets done in singular areas rather than relying on a parametric plotting programs built-in heuristics. The downside is that you’ll either have to come up with programmatic ways of generating the “sheets” of your surface or else import the mesh from some point and click tool. The visualisation part can do everything you want (lighting, captioning, animation, etc) except “automatically drawing on the surfaces”, but since the input is being provided as a mesh if you can figure out a some way of picking those mesh vertices through which you want your curves to go through, or which “mesh face” you want symbols on, you can draw them as separate objects so that they “appear” to be drawn on the surface.

    A MATLAB licence is however probably very expensive just for drawing some diagrams. There’s GNU Octave which is an attempt at a FOSS implementation (using GNUPLOT as the visualisation backend) but I don’t know how much of the drawing facilities they’ve actually implemented. (I hold no brief for MATLAB: I think it’s horribly overused outside it’s “optimal domain” but this problem seems to be one where it’s a reasonably good fit.)

  3. John Baez Says:

    Why does the swallowtail cobordism look sort of crinkly, as if it had been left out on the dashboard of your car on a hot day?

    It almost seems as if the wrinkles move as the surface rotates, too!

    I love the swallowtail cobordism so these things matter to me. My student Mike Stay is writing about compact monoidal bicategories, where the swallowtail plays a key role.

  4. Mike Shulman Says:

    You seem to be more proficient with blender than I am, so I hesitate to say this, but it looks like maybe retopo might be the sort of thing you’re looking for re: drawing on the surfaces?

    I’m a little surprised at your second question; while I haven’t actually tried myself, I think I would find it easier to draw some complicated surface (like the ones above — which look awesome by the way!) directly in blender’s 3D editing mode, than to try to figure out an equation whose graph would be that surface. This is the case in 2D, certainly. For instance, when I write calculus exams with problems like “tell me things about this function given only a picture of its graph,” it’s generally much easier for me to draw the graphs with bezier curves in Inkscape than it would be to try to figure out some equation whose graph looks like I want it to and graph it using some mathematical software.

  5. John Baez Says:

    For some strange reason Scott Carter was unable to post this comment here:

    The master is Kenny Baker . Somehow the learning curve on these things still remains steep. It would be nice to embed such foams in 3 and 4 dimensions, project and rotate at will.

  6. Simon Willerton Says:

    I’ll continue this over at the old place once I’ve found out how to embed videos. I’ve asked how to do that at the TeXnical thread.

  7. acupuncture new york city Says:

    acupuncture new york city

    Modeling Surface Diagrams | The n-Category Café

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s

%d bloggers like this: