Stijn Symens @ Wordpress

18 maart, 2008

Drawing braids using METAPOST

Filed under: wiskunde — Stijn @ 4:51 pm


If you are writing a book on the braid theory (or Theorie der Zöpfe as E. Artin called it) , this might be a useful post; a few weeks ago, I made a little metapost program to draw braids. This file allows you to draw a continuation of braids using a single simple statement.
All you need to do is put the file in your base metapost directory (or just put it in your working directory) and include the file using the code input;.

Two commands are made to draw the braids:

drawbraidwithlines(n,s) draws an n-strand-braid based on the string s. In the string, the i-th letter of the alphabet gives a crossover between the i-th and the i+1-th strand; a capital letter does a right crossover, a small letter gives left crossover. An example makes this clear:

setbounds currentpicture to boundingbox currentpicture enlarged 2pt ;


drawbraid(n,s) does the same, but without the lines:

setbounds currentpicture to boundingbox currentpicture enlarged 2pt ;

gives you the picture


Thickness of the lines can be adjusted and horizontal and vertical scaling is also possible. Check out the comments in the file for this.

As an exercise you might try to draw this 3-strand braid (I’m exercising to do the hair of my daughters).


About these ads

3 reacties »

  1. [...] These beautiful braid-pictures were produced using the braid-metapost program written by Stijn Symens. [...]

    Pingback door F_un and braid groups — 22 september, 2008 @ 3:26 pm

  2. [...] in the mathematical study of braids, called appropriately braid theory, and can be used to produce images of braids simply by describing the [...]

    Pingback door Handcrafting the digital: Wedding rings « Maxwell's Demon — 15 januari, 2013 @ 11:40 pm

  3. [...] study of braids, called appropriately braid theory. Braid theory can be used to produce images of braids simply by describing the crossings. Using this method we could describe a wide variety of braid [...]

    Pingback door Woven Wedding Rings by Edmund Harriss « Gnarly Architecture — 16 januari, 2013 @ 8:10 pm

RSS feed voor reacties op dit bericht. TrackBack URI

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen. logo

Je reageert onder je account. Log uit / Bijwerken )


Je reageert onder je Twitter account. Log uit / Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit / Bijwerken )

Google+ photo

Je reageert onder je Google+ account. Log uit / Bijwerken )

Verbinden met %s

Het Silver is the New Black thema. Maak een gratis website of blog op


Ontvang elk nieuw bericht direct in je inbox.

%d bloggers like this: