Chad Gadya embroidermation finished at last!

After a little over a year and a half, and many interruptions, we finally finished our embroidermated short, Chad Gadya. While we were working on it (actually I was working, Theo was procrastinating) this other embroidered short came out, but there are differences. Thanks to Theodore Gray’s stitchcoding in Mathematica, we weren’t restricted by (invariably crappy) off-the-shelf software. This allowed us to automate beautiful iridescent stitches and preserve them from frame to frame, so the resulting animation really looks like moving embroidery.

Every single embroidered frame you see here is available for sale, signed and numbered and one-of-a-kind. Only 9 months ’til Passover!

Chad Gadya will function as a sort of “intermission” in my feature film Seder-Masochism, marking the end of the Passover meal but just the beginning of the Israelites’ trials in the desert.

Update: Theo’s post on the technical side of stitchcoding embroidermation.

“It took a while to get all this code right, but of course it’s crucial that it cover every possible case, because when you’re doing animation, it’s not about getting one frame right, it’s about having an automated process that always gets every frame right, not just once, but every time there is an iteration of the animation requiring a re-render of the frames. We must have generated tens of thousands of frames (just generated the files, not actually stitched them!) before it was all looking good.” Theodore Gray

Update 2: All the stitching files we made for this are Free (CC-BY-SA) at! Download ’em and stitch ’em out as you please. They’re PES format; wish we had something better, but all embroidery formats suck.


Horse Quiltimation

Horse (1)


Algorithmic quilt fill patterns by Chris Carlson

Concept, design, reverse-applique snipping by Nina Paley

Stitchcoding & binding by Theodore Gray

Stitched by Behemoth

Based on horse photographs by Eadweard Muybridge, 1878

Same horse at half speed

Same horse at half speed


Crossposted from Theo’s new stitchblog. We’re rearranging and will hopefully have a functioning blog there soon. –Nina

Welcome to my new Stitching Blog. It’s like my regular blog except all about quilting and embroidery. I’ve separated the two, because I get the feeling that people interesting in my science writing and app-making activities may find all the stitching a bit tedious, and vise-versa. Also, I have taken the liberty of using the same list of subscribers to my stitchcam as the list to be notified (via rss feed) when there’s a new post on this blog. I figure if you’re interested enough in stitching to get real-time notifications of a quilting machine running, you’re probably interested enough to hear about an occasional blog post.

So without further ado, my first new stitching-related blog post. I’m afraid it’s a rather technical one….

One of the big problems with fabrics and quilting is that fabric is not a proper engineering material. It’s stretchy and sloppy and never goes exactly where you want it to. The situation only gets worse when you add batting to the equation.

We’ve been experimenting with extra-thick batting, as much as two inches thick, and have had a problem with the resulting “quilts” not lying flat, because some parts of the pattern shrink the dimensions of the fabric more than other parts, resulting in a sheet that is internally stressed.

You might think it’s a simple case of more stitches equals more shrinkage (as it more or less is with embroidery), but this is not the case.

To see why, consider a cross section of a quilt with different spacings between the quilting lines. When there are no lines, the fabric on the top and bottom are flat, and the piece overall will be just as long as the fabric originally was. As you add more lines, the fabric is forced to go up and down, so even if the fabric isn’t physically compressed, the piece overall will get shorter.

Here is a schematic illustrating this fairly obvious fact. Clearly if the lines (the top and bottom fabric) stay the same length, the overall length of the quilt must get shorter.

But what if you keep going? There is a fallacy in this drawing: The thickness of the quilt is staying the same. Clearly the following is NOT what happens if you add even more lines:

These diagrams get more and more absurd, because of course what actually happens is that the batting gets hammered down, the piece gets thinner overall, and the fabric goes back to being flatter. And that means the overall piece should start getting LONGER again, at a certain point. That’s what I wanted to confirm and quantity, so I had Behemoth stitch twelve different test strips like these, each about a meter long:

Here is the diagram again, except this time the widths shown are real, measured widths from my experiment. (In the diagram below, the number of humps is real and the relative lengths are real, but the thicknesses are schematic, because I didn’t measure the actual thicknesses):

As you can see, there is a minimum length around 30 humps, and by the time you get to 200 humps (0.5cm line spacing) the thing is well on its way back to its original length.

Here is a plot of the lengths as a function of line spacing (the right-most data point represents infinite line spacing, in other words the original fabric length):

The interesting fact about this is that, because there’s a minimum, there are going to be two ways to get any given amount of shrinkage, a large-spacing way and a small-spacing way, one on either side of the valley. In order to get a quilt that lays flat, you don’t have to keep all the spacings the same, you can have zones of stitching width spacings on either side of the minimum.

These tests were all with lines in only one direction, but what if you add crossed lines in the other direction? I did a second set of twelve test strips with lines going in both directions, like these:

The following graph is a bit harder to read. The horizontal axis represents the line spacing in the direction of shrinkage (just like in the graph above). The vertical scale is again overall length of the piece. The lines connecting data points represent sets of similar spacing in the lines going the other direction. The bottom set has no cross-lines (i.e. it’s the same data points as the graph above, except a smaller number of them shown). As you go up, each line represents more and more closely spaced cross-lines. The data points are labeled with the line spacing in the shrinkage and crossed directions respectively.

The result is as expected: The more closely spaced the crossed lines are, the less shrinkage there is, regardless of how closely spaced the lines are in the shrinkage direction.

Now all we need to do is actually use this information to make something pretty that doesn’t warp…. In the mean time, we’ve been experimenting with the other solution: Stretching on a frame.

This quilt is “double-quilted”, using the term Nina invented for a thing I decided to try because why not. It’s basically a quilt on top of a quilt, so we can have a secondary level of relief that isn’t hammer down overall. I’ll write a full blog post about this technique later, but here’s a closeup that gives an idea of what it looks like:

Was all the quantitative measuring useful? Maybe…. So far I’ve used it only to create an interpolating function that I have used in some calculations involving how wide to make flaps that wrap around the wooden frame holding up stretched quilts like this. Hm, that’s probably another blog post too.

More Single Line Art

I am a better line processor than any algorithm we currently have access to. Behold what I turned into a SINGLE LINE by hand:

Look upon my works, ye mighty, and despair!

Look upon my works, ye mighty, and despair!

Many people think we’re using Mathematica to do the drawings of our Quilt Money. We’re not! I am drawing all this stuff by hand. Theo uses Mathematica to route my drawings that contain T-intersections, but I’m learning to make my drawings single lines without T-intersections by hand, because they route much better that way. Everything below was drawn by me, by hand:


Only a few bits (the seals and part of the border) need to be routed in Mathematica. Everything else I drew as single paths. Which is quite a brain-hurter, lemme tell ya. Here’s a screen capture of me working on this same project last week:

I could do this much more efficiently now, using what I’ve learned since then. Which is good, because the better I get at this, the more I can help someone else create algorithms to automate this kind of work.

And yes, at some point we hope to offer an affordable $100 Quilt. But first I have to get the design right, and then our potential partner has to be able actually produce it without losing money. We’re working on it.

Our quilted money is one of the few things I don’t share source (in this case, vector) files for, because currency isn’t exactly like other culture, as I explain here.

The holy grail of quilting design


Single-line art is the holy grail of quilting design: the sewing machine head can stitch the entire design without starting, stopping, or breaking thread. To illustrate this for an upcoming talk I drew a holy grail as a single-line drawing. I did this by hand in Flash, and made this simulation of a simulator by deleting line segments one at a time.

I would love a program that intelligently automatically converts my line art into single-line art. Theo made something like that already, which preserves all the line segments and relies on back-tracking. But I’d also like something that replicates what I did here by hand: removing and adding small line segments so no back-tracking is needed. It would need to analyze which smaller line segments could be sacrificed, and which segments could be doubled (parallel lines can be easily added to a design like this).

You need single line art for automated quilting, and that’s what we do. But getting from regular line art to single-line art is currently no small task, for humans or computers.


Chad Gadya embroidermation progress


A wee taste of the progress Theo and I are making on our “Chad Gadya” embroidermation project.


Frames of the animation are stitched in groups of 6, arranged in a circle on matzo covers. We currently have 516 frames on 86 matzo covers, which I painstakingly finished by hand with multiple fabric layers and labels and everything.

Matzo covers

We hired Theo’s daughter, Emma, to help. Here she is ironing away while I adjust a lining.


Here I am topstitching one of the 86 covers on a treadle sewing machine.


We have a lot of additional photography, stitchcoding and stitching to do, but we are making progress. When the film is done the matzo covers will be for sale.

Chad Gadya cycling backgrounds

Which 24-frame cycle do you like more:


Cycle A, “Clouds”, or…


Cycle B, “Waves”?

I personally prefer Cycle B, because I like backgrounds where everything is moving – I feel it gives it more depth. As a 2-D design the clouds look nice, but in an animated cycle their stillness bothers me. I did make a version with moving clouds, but on this 24-frame cycle they had to be very dense to repeat:


Cycle C, “Repeating Clouds”. I still prefer Cycle B. The sky pattern might be a bit unconventional, but I think it’s stylish. Also I don’t like all that white in the background of A and C.

The palette is limited to 10 colors because this is destined for Embroidermation. The animated GIF doesn’t have great color fidelity; thread colors will look better and have more contrast between foreground and background.

If you have an opinion on which of these you prefer, please leave it in the comments and maybe it will help Theo and me settle our argument.

PaleGray Labs finally gets its own web site

I’m all wordpressed out for a while.



Our Thousand Dollar Quilts now have a web site of their own. Offered at face value.

Interestingly, money is not culture; currency is. More on that in my essay Culture is Anti-Rivalrous (scroll down to part IV). And here I am, a Free Culture advocate minting money on my quilt plotter. My impulse to share source files is mitigated by this. Free Culture readers of this blog: how can I best share the culture of this project without compromising the identity of the bills themselves? I like to share the “source code” of my projects once they’re out there, but I don’t see how I can do that with this one.

resampling DST files


Our Quilt Plotter’s rather frustrating software automatically resamples DST files, for no explicable reason. While we struggle to communicate with its manufacturers to overcome this “feature,” I attempted to explain the problem in pictures.

1. A line, or vector file, is not a DST file yet. A DST file is comprised of many points, like so:

1. A line, or vector file, is not a DST file yet. A DST file is comprised of many points, like so:

2. This has a high sample rate, because there are many points spaced close together.

2. This has a high sample rate, because there are many points spaced close together.

3. Above is a lower sample rate, with "stitches" in black. There are fewer points and they are spaced further apart.  The machine always, always, automatically RESAMPLES DST files, which inevitably degrades line quality. Here's a resample at the same sample rate (frequency/spacing of points):

3. Above is a lower sample rate, with “stitches” in black. There are fewer points and they are spaced further apart. Here’s a resample at the same sample rate (frequency/spacing of points):

4. Every time the path is resampled, it moves further from the original line. This happens even if it's resampled at the same sample rate, as shown here.

4. Every time the path is resampled, it moves further from the original line. This happens even if it’s resampled at the same sample rate, as shown here.

5. Same sample rate, worse fidelity because of resampling.

5. Same sample rate, worse fidelity because of resampling.

6.  If we resample enough times eventually our path won't resemble the original line.

6. If we resample enough times, eventually our path won’t resemble the original line.

7. Not what we want.

7. Not what we want.





THIS is what we want the machine to read. We can control all the points in the DST file in Mathematica. We just want the machine to not resample them, to keep the points in the original file we give it. Here the points are evenly spaced except at corners and curves to preserve fidelity.

Tree Applique Quilt


More raw-edge applique on the quilt plotter! About 94″ square. Cotton fabric, cotton-polyester batting, polyester thread. The process:

photo 4

Stitch all-over background design, including shapes where leaves, fruits and branches go.


Cut out pieces of leaf- and fruit-colored fabric. Lay them on the quilt (still in the frame) over where they’ll be stitched down. Return frame to quilt plotter and stitch.


When the leaves and fruits are stitched, lay a big piece of brown, tree-colored fabric over them where the branches go, and another piece where the trunk goes. Stitch.

greenlaidTrim the base of the tree and lay a piece of green fabric over it as above.


Stitch that sucker down per the digital design you’ve carefully prepared. Then fold the fabric over and quilt on the top.


When done stitching, remove quilt from frame and trim. Begin snipping.

NinSnipsTreeSnip snip snip.

TreeAppliqueDone3Snip until done, then  bind.


Here’s the back.



Et voila.


Water Wheel

water wheel5

click for animated gif

Back on the Quiltimation front, I was wondering if I could arrange animated frames on a quilt in a mandala/medallion pattern, rather than left-to-right cells. This would essentially be a quilted phenakistoscope, with the animation emerging as the whole thing is rotated (we’d keep the camera and lights stable, and rotate the quilt).

water wheel6

click for animated gif


The saturated colors here would be lost, although I could use a few colors of thread. The elements are early Leviathan designs, and Water from Chad Gadya which is still in (very slow) progress.


Pink Arabesque

PA_finished93.5″ x 95″. Cotton fabric, soy/cotton blend batting, polyester thread. Designed by me, stitchcoded by Theo, stitched on Behemoth the Quilt Plotter, reverse appliqued and bound by me. The process:

1. Draw vector design in Macromedia Flash 8.

1. Draw vector design in Macromedia Flash 8.

2. Load onto Quilt Plotter and set appropriately.

2. Load onto Quilt Plotter and set appropriately.

3. Stitch.

3. Stitch.

4. Begin snipping away top layer of fabric (because you loaded two top layers before stitching, color on the bottom and white on top)

4. Begin snipping away top layer of fabric (because you loaded two top layers before stitching, color on the bottom and white on top)

5. Keep snipping.

5. Keep snipping.

6. Snip until done.

6. Snip until done.

7. Bind on Davis Vertical Feed treadle (best binding machine evah).

7. Bind on Davis Vertical Feed treadle (best binding machine ever).

8. Include tag.

8. Include tag.

9. Place on Momz's bed.

9. Place on Momz’s bed.

10. Get approval from cat.

10. Get approval from cat.

This is an experiment/prototype. Someday we may sell these, but for now PaleGray Labs is just research & development, consulting, and commissions.

EmbroiderModder 2 kickstarter launch

The world needs open source embroidery software.

Direct Kickstarter link here.

Some of EmbroiderModder 2’s kickstarter rewards include designs and stitched pieces by me.

One Fish, Two Fish…

A friend recently refinished my Singer parlor cabinet (pix later) and asked to be paid in quilt. He’s a fish scientist, so naturally he wanted a fish quilt.

Niels fish 2It’s a little over 6′ by 3′ – I haven’t measured it actually. Also the photos are all a bit distorted because I couldn’t shoot it straight on. Instead these are all taken of it lying on my cutting table.

Niels fish 1The technique is Trapplique. The parts were stitched on the quilt plotter. I cut them out, then basted and satin stitched them down with my sailmaking machine.

fish stitchingIt has a sequined and beaded eye.

Niels fish eye


The quilt above belongs to Niels the fish scientist, but the most efficient use of materials with this design was to make 2 fish’s worth of trapplique parts in one stitching. So I assembled a mirror image fish for myself:



Fish2 tag

I stitched the binding on my Davis Vertical Feed, best binding machine ever.