Designing Generative Knots and Braids in a 2D Vector SPace

Recently I gained access to a wonderful selection of pen plotters and have been coding up vector drawings to plot. I use these drawings to explore new (or often very old) ways of working with 2d vector graphics as well as abstract rule driven design. Unless otherwise noted these plots were made using python and the Vsketch library.
Braid Designs

This year I have been obsessed with knots, both in a practical and mathematical sense. As I did some thinking about how to generate knots and braids in a 2d vector space, I realized that some of the problems of designing and drawing these shapes were deceptively nontrivial. For example, take the problem of overlaps. If we were to draw overlapping strands using conventional vector graphics methods by making each a strand a polygon with a particular order that occludes other polygons, then each strand cannot not overlap with itself, or go under another strand at one point but go over it at another. Both of these properties are essential for representing knots and braids.
First I made a system for tiling permutations of n-strand braids. Below are 4 and 5 strand braids.


After getting a robust permutation tiling system working, I focused on breaking the grid by removing the horizontal lines and crossing braids over eachother.
