Low-Level Stitching Algorithms

The following is documentation of some simple algorithms I’ve been coming up with in conjunction with this blog post on coding for machine embroidery.

I’ve recently been working on these stitching functions among other things for an independent study with Golan Levin (Fall 2019). My short term goal has been to compile a number of versatile functions that can be implemented by other digital textile artists for their projects. These examples were all written in Processing (Java).

Working with Lines

One program I wrote allows users to specify a series of cubic bezier curves, and then call a function that converts this line to a vector array representing each stitch of a satin stitch along the line. Variables include stitch width (how thick the finished line is) and separation (distance between semi-consecutive stitches) as well as the acute angle behavior.

*The blue artifact left after reducing the line widths is only in the gifs and not from the Processing sketch or stitch displacement

This program was also adapted to generate straight stitches from the same lines. I actually used this to create the asset that appears at [00:34] of this animation:


Another set of functions I started were circle fill stitch functions. My goal was to allow the user to generate a stitch path vector array by defining a circle similar to how one would draw a circle to a Processing canvas. The user defines its position, radius, stitch-length, and stitch separation.

For the simple straight stitch spiral, separation is the radius decrease for every revolution, and stitch length is the resolution of the spiral:

For the satin stitch spiral, separation defines the distance between semi-consecutive stitches and length determines the width of each pass around the center:

Going through trial and error.

  1. Pingback: Stitches in Motion

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s