String Notes Rotating Header Image

A tiny intersection

I use the statistical software language R extensively at work: all my data analysis and graphing is done in R. I have a couple of software packages in the R archive, and have published peer-reviewed papers on those R packages.

And so everything starts to look like a nail…

I’m working on a project that requires drafting lots of new tablet weaving patterns: doubleface, 3/1 broken twill, maybe some pebble weave. I’ve done patterns with colored pencil and graph paper, with a spreadsheet, and with GTT, but none of those are exactly what I need.

I could write my own pattern software in R! (Yes, I am clearly approaching maximum possible geekiness. But you knew that, right?) Right now, it will take a bitmap image, check it for weavability, and create a pattern draft for either doubleface or twill.

The intersection of the sets of avid tablet weavers and avid users of R is likely very small, but it may well be greater than one. If there’s interest, I may eventually polish the code and turn it into a proper package with documentation and such.

This is what tablet weaving looks like, in miniature.

tiny silk band

This section is doubleface,

doubleface

and this one 3/1 broken twill.

broken twill

Take an image, say the R logo.

Shrink it to a weaveable number of pixels and convert it to black and white. For this one, rotate it too.

R logo in black and white

Run it through the doubleface check routine, and plot the result. The plotting function automatically puts red X symbols on the spots where the pattern needs tweaking before it can be woven in the desired structure. (Color changes must be an even number of pixels / weft picks apart vertically for this structure.)

check the pattern

The lines by default are every 10 pixels, but that can be changed.

Fix those problems, and run the check again. Repeat as needed until the design is weaveable.

Then run the doubleface pattern generator on it. The weaver needs to specify whether SS or SZ structure is desired. A twining plan is returned that shows the direction of twist in the band (though it doesn’t cancel out the reversal points). This is the same as the turning plan if all tablets are S-threaded.

Doubleface in SS structure

For this one, the doubleface is in SS structure, with all tablets threaded the same way.

That’s the effect of using an alternating threading instead. If you want to weave it with tablets actually threaded alternately instead of all S, there’s a function for that too. That function takes the twining plan and creates a turning plan with a particular threading.

I think this is the best one: I swapped the SZ for ZS setup, and created the corresponding SZ turning plan. Now someone just needs to weave it (set the cards up ZS across the pack).

final doubleface R logo

There’s no hand-holding. This is a command-line tool, and you need to keep track of what you’re doing, and what the output files are. It won’t tell you how to set your tablets up: you need to know what you’re doing. But there’s nothing better if you have a stack of images to draft, and it runs on Windows/Linux/Mac.

It does do twill, though that’s harder to design and to weave, and using the patterns may require a bit of knowledge on the part of the weaver. I’m going to add pebble weave, and I’ve set it up in such a way that other structures are possible if I have a need for them.

5 Comments on “A tiny intersection”

  1. #1 Rebecca
    on Feb 2nd, 2012 at 7:12 pm

    Yes, there is more than one tablet weaver who is mad about R! (I’m not so mad about tablet weaving, but I’m always excited when I find someone else using R.) =)

  2. #2 Joe Franko
    on Feb 2nd, 2012 at 10:04 pm

    Wow! Another R user who is also a weaver. Most of my work is done on an 8 harness, 48 inch wide floor loom, but I’ve done a fair amount of card weaving with kids in my time!

  3. #3 Connie
    on Feb 3rd, 2012 at 4:02 am

    Not a weaver, but a knitter – and you just gave me an idea. It should be possible to use a similar routine to translate pictures into knitting patterns….

  4. #4 Jim Lemon
    on Feb 3rd, 2012 at 4:25 am

    Hi Sarah,
    Now I can put a face to the name. A neat bit of programming, and if I ever make myself another macrame belt (oh, no!) I might just weave an “R” into it.
    Jim

  5. #5 Keith Pierce
    on Feb 24th, 2012 at 10:06 pm

    I’d love to give your program a try, Sarah! I’m a veteran mathematician and programmer, and fledgling tablet weaver focusing on 3/1 twill. Like you, I’ve found that no design aid does everything I want. Wallowing in ignorance, it never occurred to me to look at R. But its combination of a full programming language with powerful graphics features may be a good fit for me. For example, the weaving diagram you’ve produced is much cleaner, and looks much easier to follow, than what I’ve been able to get out of GTT.

    I hope that you can share what you’ve created.