I returned to my favorite programming nerd conference, Strange Loop, this year with a talk about weaving. It has some juicy bits about draft notation, matrix multiplication, and niche aesthetics based on a french math treatise from the 1930’s.
Hi everybody; welcome! I’m Lea and I’m delighted to be returning here to Strange Loop for the third time. Just out of curiosity, were any of you at my talk two years ago about knitting? A couple of you, oh, that’s exciting. Alright, forget everything you learned there, because knitting is totally different from weaving. If there’s one takeaway I want you to get from this talk: knitting is totally different from weaving. Which of course brings up the question: what is weaving? In addition to being this guy, Hugo Weaving, weaving is one of the ways we have of turning a yarn into a fabric. And it is in fact one of our oldest technologies. Wikipedia claims — “wikipedia claims” means “take this with a grain of salt” — but, wikipedia claims that there are some indications that weaving is Paleolithic technology, and there’s definite evidence of it as Neolithic technology. So to be clear that makes actual weaving appreciably older than Hugo Weaving, even very generously interpreted. The point is that this is very old technology. It’s not quite as old as felting because felting will happen by accident if you’re not careful, but it’s been around for a very very long time and I personally find that very exciting, because it means that there have been countlessly many extremely smart people throughout the entire world, throughout history and prehistory, that have invented subtly different weaving techniques. So there’s pretty much infinite sub sub sub sub domain knowledge you could have about weaving. Which is exciting to me because you know if you’re ever having one of these days where you feel like you know everything — I don’t have these days but maybe you do — if you’re feeling bored, you can just pick up weaving and there’s infinite to know.
What all of these branches have in common is that they involve interlacement. Some set of yarns is crossing over and under some other set of yarns. In particular in the kind of weaving I’m talking about today, there are two sets of yarns; so there’s one set running the whole length of the fabric, which is what we call the warp, and there’s another thread or a set of threads that’s crossing back and forth to interlace with it and that’s called the weft. A lot of people have trouble remembering the difference between these terms — it may help to remember that “weft” is just an archaic path tense of weave, so the weft is the one that was weav’d into the warp. This particular swatch represents the very most basic possible weave structure, which is called plain weave, in which the vertical and horizontal strands are just alternating which one is on top in a perfect checkerboard. So at this crossing, the weft is on top and at all of its neighbors the warp is on top. We can even collapse these threads together for a slightly more compact notation that looks like this, and this is the notation I’m gonna be using throughout the talk to represent a fabric.
Something to note is the inherently binary nature of this structure: at a given interlacement point, either the warp is on top or the weft is on top. And I’m guessing that some of you may be perking up at the use of the word “binary” here because you know why the binary nature of weaving is important to this audience in particular, and I will get back to that in a couple of slides, I promise. So okay, this is a woven thing; how did we get here? We likely used a tool called a “loom.” What even is a loom? Good question! A loom is any device which can hold the warp threads — the long ones running the length of the fabric — at a reasonable tension and ideally it will help us make that interlacement a little bit easier. Maybe some of you have met one of these before — show of hands, out of curiosity? I’ve found that it’s kind of gendered but a lot of you may be seen one of these at it at a summer camp. What happens is you string up some loops top to bottom on that and then you go in with that little metal hook and you go over and under and over and under, and then you pull another loop across to interlace with the other ones. Which is a really good way to keep kids busy at summer camp, and if you, for example, wanted to kill twenty years as your husband straggles back from the Trojan War, this is also a really good way to get weaving done. But if you actually want to be weaving yards and yards of fabric it is not practical to have to go over and under and over and under every single one.
So what most looms do is they give you some way of forming a “shed.” A shed is an area formed when some, but not all, of the warp threads have been lifted up. This is magical because it means that when you pass the weft thread straight through in a straight shot, it’s going to be over some of them and under some of the other ones. This is one of those concepts that is simultaneously extremely basic and extremely magical, I think, because you’re doing this very simple mechanical motion — subsetting some threads — and then doing a very another simple mechanical motion to interlace them together. The basic mechanism that that does this, that forms this shed, is called a heddle, and it’s simply a little hole that the warp threads go through. So if the heddle goes up, the warp thread that is associated with that heddle will also go up. This is a very basic kind of loom still, in which the odd-numbered threads are each going through a heddle, and in this particular case the evens actually are going through a space between the heddles, which you can kind of think as itself a heddle, I guess. This is enough to accomplish the plain weave because you can lift up the whole heddle frame to bring the odds above the evens, and you can push it down to bring the evens above the odds. So you have a small rigid mechanism that can separate the warp into two subsets, which is enough for the plain weave. But you can’t do a weave structure that’s more complicated than that plain weave without having to do some manual interlacing. In this picture they have done that with that green yarn.
On the other end of the loom control spectrum is the jacquard loom, which looks like this, and which, by the way, was not invented by Jacquard; it was invented by a bunch of people including Bouchon, Falcon, and Vaucanson. Some of you have heard of this buddy before, and it’s what I was referring to when I said that the binary nature of weaving is historically interesting to computer people. That’s because the jacquard loom in particular has a mechanism in which every single warp thread can be lifted, can be controlled, by a program encoded as a punched card. That’s notable to us because this idea of encoding binary data on a punched card would go on to inspire lots of early data storage and early computing history. It’s really cool; it’s also super not relevant to us today. This is not a talk about jacquard looms.
Somewhere between that little rigid heddle loom, with its two subsets — odds and evens — and the fully individualized heddle control of a jacquard loom is a loom like this, which is a four shaft floor loom for hand weaving. This particular loom is a modern sort of mid-range floor loom of the kind you might buy to weave scarves or table runners in your house. This particular model, I think, would run you about five hundred dollars. When I say that it is a four shaft loom, what I mean is that there are four heddle subsets defined by these wooden frames across the top. So each warp goes through a heddle associated with just one of the frames and it goes between the heddles on all the other three frames, and to use this loom you would sit in front of it and you would press a pedal to raise up some of the shafts. (Also, sorry, I’m saying shafts and frames interchangeably; in this context they are interchangeable, so shaft means frame and frame mean shaft.) So you sit in front of it you press a pedal and you’re gonna raise some shafts. But wait a minute, there are eleven pedals! Why are there so many pedals? There’s only four frames! It turns out that this is actually configurable. Any one of these pedals can be tied to any subset of the frames. This mapping is called the tie-up and it is an important creative tool for the weaver. Talking about the tie up and why it’s an important creative tool for the weaver is the premise of the rest of this talk.
So first we’re going to go into a little side tangent about the notational system that hand weavers use. This notation system is called a draft. In the bottom left corner you see a woven interlacing, just like the same notation I showed you before. This one is slightly more complicated than a plain weave. It’s still considered very basic; it’s called a twill weave. The basic concept with the twill weave is that in this case you’ve got the weft going over two warps then under two warps then over two warps, etc; in the next row down, it’s still going over two under two, but the whole thing has shifted by one from the previous row, and because it’s over two under two, this is called a two by two twill weave. The part at the top left is called the threading. This threading representation is showing us which thread is associated with which heddle frame, so in this particular threading, that leftmost warp is passing through a heddle in the fourth frame. So whenever the fourth frame is lifted, that leftmost warp will go up with it, as will the fifth, ninth, and thirteenth warps as well. So this is something I just want to take a moment to emphasize again: we’re talking about physical things, and threading a loom is actually kind of a pain to do because you have to have to measure out a bunch of warp threads, you want them to all be the same length, you want them to all be the same tension, you don’t want them to be intertangling with each other, and then you have to pull every single one of them through a little hole. So this threading is something that you probably only want to do once per fairly long piece of fabric; keep that in mind. On the bottom right, we have the treadling, and for our purposes again, treadle and pedal are synonyms, so the treadling is simply which pedal you’re pushing down at any time step along the sequence of weaving. So each row corresponds to one raising of the warp, putting the weft through, and then letting the warp back down. In this case of course, the first row, you’re going to be pushing down on the leftmost pedal, and then the second from left, et cetera: one two three four.
So if you push the leftmost pedal, which warp threads are raised? Those of you who are thinking, “well that depends on the tie-up” have been following along very well with the talk so far, and you’re absolutely correct: the tie-up defines that mapping between a pedal and some number of pedal frames, so in this case the leftmost pedal is tied to the back two frames. To find the warps that will be raised, we simply read up: we can trace up to see which frames are going to be selected by that pedal, trace over to the associated warps, and then draw them down into the representation of the fabric. And we would of course continue drawing in the rest of the fabric the same way to get the full interlacement.
I was talking about this notation with a friend of mine, saying, “oh this is really cute little sort of compact notation for talking about mechanically what happens when you’re weaving” and my friend was like “oh yeah, weaving drafts, those are just matrix multiplication” and I was like “yeah! No, I have no idea what you’re talking about; I’ve never multiplied a matrix in my life,” and unfortunately when you google for “weaving, matrix, and multiplication” you get this picture… which is completely unhelpful. But fortunately, at the same time I was actually taking a machine learning class, well, ambifortunately at the same time I was taking machine learning class, so shortly thereafter I had reason to watch this completely amazing youtube series by Grant Sanderson; this is Three Blue One Brown; if any of you want to learn about matrices or, like, learned about matrices but kind of hate them, if you want to stop hating them this is some really good YouTube content right here. And he talks a lot about what it means to multiply a matrix and it’s on various conceptual levels, which is all completely fascinating. But all that we really care about right now is that matrices are grids of valu, you kind of arrange them side by side or diagonally to each other such that you can read across the first row of the first matrix and down the first column of the second matrix and get your answer at the intersection taking pairs of elements. You take the corresponding element of each one, so top one on the top first column, left one on the first row, multiply those together, moving down and across, multiply those together, add it to what you had, keep going and eventually you reach an answer for that position. Since that was the top row of A and the left column of B, this is the top left value. There’s lots of reasons why this is cool and interesting, probably — definitely! — but basically you keep going and you do the same thing for all of the cells — all the row and column intersections — and you get something that looks like this. And this particular case I think is actually really ugly because these numbers got huge.
This is fortunately not a problem we have, because in weaving we’re using binary states. I’ll show you what I mean: if you look at these weaving drafts everything is either on or not, right: so a pedal is pushed or it’s not, a pedal is tied to a heddle frame or it’s not, a warp is allocated to a frame or not, and in the final interlacement, either the warp or the weft is on top. This is going to really simplify our arithmetic because we’re going to be multiplying by zeros a lot, and then we’re gonna be adding zeros a lot, and these things are very easy to do. So the way we’re gonna get to the actual fabric, it turns out, is that we’re gonna multiply the treadling times the tie up — times a transposed version of the tie up — and then we’re gonna multiply that times the threading. So let’s look at the first multiplication operation first. Right so as I said, we actually need a transposed version of the tie up and this is just sort of due to how we arrange them on the page in the first place, so we flip the tie up across a diagonal. In this particular case the result is absolutely the same. So taking the first row and column we get some filled in boxes and some that aren’t which we can kind of think of as, of course, ones and zeros. So that first row and column, we want one times one, zero times one, which is zero, zero times zero, which is still zero, and zero times zero, which again is zero. And so that of course works out to being one; great, we have a one in this position. By the way, this isn’t actually strictly binary, because you could be pushing down more than one pedal in a row; again, the pedals are physical things which a weaver is pushing down with their actual legs, of which most weavers have at most two, but you can, you know, push down more than one pedal with one leg, sort of straddle between them, etc. So what you’d actually do in this case, if you had more than one pedal down, is you would threshold: so in the final arithmetic, zero would still mean zero; one or anything more would still mean just one. Filling in the rest of this matrix, we end up with essentially “frames per time step,” and we’re not at the full fabric yet, because we haven’t multiplied out to find out what each frame means in terms of threads. However, for what it’s worth, in this particular case it already kind of looks like the fabric, doesn’t it? And that’s because in our case, the threading is actually just the identity matrix repeated across and — sorry, I’ll come back to that concept — so the fabric is actually just repeating out the frames per step. And actually, there’s a bit more hijinks because this is transposed again because of the way we laid it out, but we get back there somehow and that should actually have been a diagonal flip, but Keynote doesn’t do that so just use your imagination.
Okay so we’ve come we’ve come back full circle on the draft: that’s what it means; that’s what it looks like. And there are two takeaways I want you to think about with with respect to this notation. One is it’s all purely mechanical logic, right, the way we’re mechanically doing selection is functionally an “and” operation, right? The data passes through if both of these things are true: if the pedal is down and the pedal is tied to a frame, pass through; and if a warp is associated with that frame, pass it down into the fabric. And I find this very very satisfying! On a mechanical level, we’re talking about levers and pedals and stuff and we’re passing data along. The other take away, from a design perspective, is that all three components act together to produce the final fabric in a way that often feels kind of emergent. There’s a sense in which anything you wanted to change in the tie-up, you could just change in the treadling instead; however, there’s a sense in which altering a specific one gives you a way to think about your design that the other ones wouldn’t.
So for example, in this case both the threading and the treading are, as I said, they’re the identity matrix. This is a really common set up, and actually has its own name: we call it a “straight draw” or “straight threading” and it’s really common because a lot of times when you have all three of these ingredients coming together, you want to keep one or two of them constant while you play with the third one. So to show you some sort of juicy examples of that, here are several fabrics with the same threading and tie-up but different treading. Alright so it’s really easy to switch the treadling midway: this is a decision you’re making at every time step, and as I said you can push more than one pedal in a row (you see that in the bottom right example there). And sort of conversely here are several fabrics with identical threading and treadling, but different tie-up. I’ve also switched to eight shafts here to give you a little bit more complexity and this is a “pointed threading” instead of a straight threading. So, physically speaking, changing the tie-up is a bit more work; you do have to untie knots and retie knots, but you can totally still do it in the middle of changing a weaving draft.
What you don’t want to do is change the threading! Right, so that kind of raises the question: how should you thread your loom right to get maximal utility out of the threading that you have, and not want to change it? Of course that depends on what kind of thing you want to make, right, but just thinking about sort of the theoretical limits here, how do you want to think about threading a loom? One way to think about it is that you have as many unique pattern rows as there are combinations of frames available to you, minus the useless ones. (And I’ll say what I mean about that in a moment.) So what do I mean? A “unique pattern row” means that the two highlighted rows here are actually the same, right: this particular pattern happens to step through its pattern rows in order and then back again, so it’s sort of easy to see where the unique ones are, and this pattern row is what happens when frames one, three, five, and eight are up; depending on the tie-up, I could have any combination of the frames available. So for a two shaft loom, I have four possible combinations, right: either shaft one is up, or shaft two is up, or neither of them is up, or both of them are up. Except that those last two are kind of rubbish because if everything is either up or down, you’re not interlacing, and if you’re not interlacing, you’re not making fabric, you’re making a pile of yarn. So we try to avoid that. In a four shaft loom, you get a lot more: you get sixteen, or you get fourteen if you don’t count the bad ones. And this is actually kind of an overwhelming way to think about weaving design, especially, you know, this is a four shaft loom — some of these floor looms go up to twenty-four shafts! That possibility space gets quite large.
But alright I said that some possible pattern rows are kind of rubbish, so what if we started with something that we know is good and think about subsetting it from there? Good, that is one way of thinking about the central premise of a style of weaving called network drafting. This is a relatively new style of frame weaving. When I say relatively new, I mean it was inspired — no, I really do mean relatively new — it was inspired by this 1938 math French monograph by Brandon and Guiguet; unfortunately, this monograph was published in a run of 200 [note that I mis-spoke here; it’s the Masson & Roussel with the very limited run] so they’re really hard to get your hands on. But this style of weaving really kicked off later in the hand-weaving world with the introduction of hobbyist level CNC looms — computer numerically controlled looms — because it really shines on that sort of sixteen to twenty-four harness range, which is to say, it’s not the full jacquard that industry had already switched to at this point, but it’s a lot more shafts than a normal person wants to think about in their mind. So in 1988, sort of with the introduction of these home hobbyist computer-controlled looms, Masson and Roussel published an inspired work, “Shaft Weaving and Graph Design.” Oh wait, I’m sorry, this is the one that was only printed as an edition of 200, but fortunately for us, Anne Wells published some notes specifically intended for a home, hand-waving audience, and this is available as a free pdf that she put out in 2000. In between those two, Alice Schlein wrote and published “Network Drafting: An Introduction,” which is currently available as print on demand, and this is absolutely where I would recommend that you start if you’re interested in this topic. I’ll be using some images from her book later in this talk. So again, 1938: publication of this math monograph, and then it was really picked up in earnest with the availability of computer-controlled hand looms, which have existed roughly alongside personal computing. And of course all of this is absolutely an eyeblink in the history of weaving — right, you know, this is the last forty years on a twenty five thousand, twenty seven thousand year scale. So this is super new! Okay, so what is it? What is it network drafting?
The central idea of network drafting, and I’m going to say this a couple more times to you, is that “any cloth structure which can be woven on an initial threading can also be woven on a threading plotted on its associated network.” Okay so there are two, at least, unfamiliar terms here: initial threading and network. An initial threading is simply the very most basic platonic unit of threading. So this is the one we’ve seen a couple of times today: it’s the straight draw, and we’ve simply gone first thread, first frame; second thread, second frame; etc. So, straight draw, aka the identity matrix. And if you did a straight tie up and straight treadling on this, you would get a fabric that looks exactly like this: a 1x3 twill. To turn on initial into a network — and I want to emphasize that this has nothing to do with like networks as any of us think of them in this room, but I will say that the fiber artists got to the term first so this is your fault, not theirs — so to turn it into a network, we repeat it across all the frames we have available to us, and then all the threads that we’re using. So if I have a fancy sixteen shaft loom, you know, repeat it down, and in this case I’m showing it on sixty-four threads, so just actually a fairly small number of threads but it’s what fits on nicely on this slide.
The important thing to note here is that the network is not a threading: after all every thread can only be associated with one heddle frame, so in an actual threading you’ll only see one filled-in square per column. What this is, is in fact a space of possible threadings; what we’ve done is we’ve constrained a given warp thread to a choice of just four frames instead of all sixteen. To pick which frame a given warp thread will actually be in, we draw a pattern line like this, which is going to form the basis of the design. This is just any sort of expressive line that you feel like designing with, and this is, you know, one of the major points of creativity in network drafting is picking this line in the first place. Once you have the line sort of superimposed over your network you simply pick the legal threading position that is closest to that line for a given warp thread. Well in this case I’m picking a sense of “closest” which actually means “closest above” and I’m wrapping the pattern vertically when that would have gone out of range over the top, so you can see that as the line is close to the top of the network I’ve come up to the bottom of it instead.
So the overall actual threading looks like the orange ones in this diagram, and because this is now a threading I can put it into a draft. And this is what it would look like with a straight tie-up and a straight treadling which is not exciting, and pretty rubbish as a fabric because there are all these very long stretches without a warp on top. But I brought it into this draft because I want to illustrate a point. The point is this: any cloth structure which can be woven on an initial threading can also be woven on a threading plotted on its associated network. So what that means is that it’s always possible for me to reconstitute the original initial fabric from this threading, so if I have a sort of fairly aggressive uniformly distributed tie-up, which, now that you mention it, kind of looks like the network, I can get back to my 1 by 3 twill. What’s changed, though, now is that I can alter some areas of the fabric without having to alter the others. So if I sort of say that the middle part of the pattern is actually two warp threads on top in a row instead of one thread, my pattern line magically re-emerges. Okay, so why does this work? I want to I want to return to the idea of threading as picking subsets. On our little four shaft loom, we only had four possible subsets among which to allocate our warps; because of the magic of tie-up and treadling, those four subsets can still create a variety of effects. I’ve shown you here a one by three twill, a two by two twill, and a three by one twill; you can do lots of other things also with the same threading but even just these three are actually, I would say, pretty satisfying, because if you have a contrasting warp and weft like this, you functionally have a light, medium, and dark gray. The problem is, on a four shaft loom, you can’t do all of these at the same time, by which I mean, in the same row of fabric, threads one and five are through the same heddle frame which means that their fates are inextricably, mechanically, linked.
However if you could wrench those subsets apart, you could address the middle section separately when you want it to — of course, you could always address both sections together, because any structure which can be woven on an initial threading can also be woven on a threading plotted on its associated network, as we all very well know now, but you don’t have to. So here are two areas being addressed independently and then together; in the top part, I’m just doing a three by one twill on the left and right chunk of the draft, and then in the middle, I’m doing a one by three twill in the middle, and then in the bottom part of the draft I’m doing both of them together. I’m sort of interlacing these instructions into one line. This idea, by the way, the idea that you can have a couple of different things happening on one line and and interleave the instructions themselves, is broadly called “block drafting” and it is a popular concept in hand weaving in general — that’s how most shaft weaving works, for most kinds of patterns. What’s unique about network drafting in particular is the idea that you can kind of phase between the blocks because if you’ve picked your blocks correctly you can sort of be half in one block and half in another.
So this is what leads to the unique aesthetic of network drafting and this is the payoff part of the talk where I show you a bunch of beautiful networked drafts. I’ve been showing you a lot of close-ups, right, we’ve been looking at these like sort of 30 thread wide things of course actual weaving tends to have at least ten threads per inch, so you’re going to see more of a scale like this in an actual fabric. Network drafting in particular is really known for these graceful flowing curves, and in this case using the arc of the treadling, sort of alongside the right there — I know it’s small, but as I said we’ve zoomed out quite a bit — the arc of the treadling is itself several times longer than the actual width of the fabric, so you’re getting these long curves over the length of the fabric. Another major aesthetic characteristic of network drafting is harmonics, or echoes, and this is something that if you’re interested in this, this is actually what most of the math in the math papers is about, but you know, sort of intuitively speaking, you can think of the fact that because you’re always phasing between blocks, sometimes you’re picking up a little bit of the next repeat of the next block. So you get these echoes, you get these harmonic off of your main motifs in network drafting. Yeah, as I said, this is sort of where the math is in the math papers, but it’s also something that hand-weavers who are trying deliberately to play with their aesthetics will either try to really bring out or kind of suppress, so again it’s an aesthetic hallmark of network drafting. Here’s an example of a network drafting that is also doing sort of a more normal block structure on the sides, so you see that the areas on the edges have just these kind of like normal diagonals, and it’s a little small and hard to see, but you can see that the threading up in the corners is just our normal straight draw threading, and then in the middle they break apart and shift together. And my final network drafting example here has the same threading and tie-up as each other — there’s three examples here — but it’s different treading between them. And remember, because treadling can be decided over the course of weaving, this very same fabric could shift between being these three fairly different-seeming patterns at the whim of the weaver. I did say that these treadlings, these sort of many-shaft treadlings, can be hard to remember. But that internal logic, that you’re always sort of going in these shifting twill diagonals — so like up and over and then up and over and then up and over — has a rhythm of its own and because of that, I think of this is a primary example of hand weaving in the flow state. It’s an improvisational process between the math setup that the weaver has done in advance of weaving, and then the actual process of them sitting at the loom getting into the rhythm of what this network looks like. Network drafting.
I think network drafting is truly beautiful, but my goal for this talk is for you to be excited about weaving in general and this is just a teeny tiny piece of weaving. So if for whatever reason network drafting didn’t get you excited, I want to show you a couple of other cool weaving tricks. Even just with the same kind of loom we’ve been talking about — this shaft loom idea — there’s a whole bag of tricks around weaving more than one layer of fabric at the same time and then bringing them above and below each other. So you can actually do this double weave on just four shafts if you’re clever. There’s also double weave network drafting — I found a PDF three days ago; it’s changing my life. You can get very far down this rabbit hole. Or! If you just like plain weave, there’s these techniques where you’re using “color and weave” in which you’re actually being careful about the colors of the warp and weft to pull out these meta patterns even with, this is just a plain weave — it’s just that checkerboard pattern, but because the warps and wefts match each other, you’re getting this emergent stripy behavior. Okay if that’s not enough for you, going further afield, how about triaxial weaving? This has all been two subsets of yarns were interlacing each other; you could have more; you could have three; you could probably have more. I don’t know that, don’t quote me on that, I don’t know if that’s true. But three is definitely possible. And getting weirder in a different direction here’s a gauze weave, in which the warps themselves displace around each other, so each half twist is held in place by the weft, and then paired with another half twist back to its starting configuration. This is a really really simple version of this technique, and there’s an entire enormously complicated subset of Japanese weaving techniques that this is the building block for. Also if anybody’s ever done sprang lace which is a Nordic technique technique, it’s arguably sort of a degenerate case of this.