
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 braids.mp in your base metapost directory (or just put it in your working directory) and include the file using the code input braids.mp;.
Two commands are made to draw the braids:
drawbraidwithlines(n,s) draws an -strand-braid based on the string
. In the string, the
-th letter of the alphabet gives a crossover between the
-th and the
-th strand; a capital letter does a right crossover, a small letter gives left crossover. An example makes this clear:
beginfig(1);
drawbraidwithlines(5,"ABabCCcDaB");
setbounds currentpicture to boundingbox currentpicture enlarged 2pt ;
endfig;

drawbraid(n,s) does the same, but without the lines:
beginfig(2);
drawbraid(7,"ABabEbCcDaB");
setbounds currentpicture to boundingbox currentpicture enlarged 2pt ;
endfig;
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).







