workshop private

← all creations

Lockstitch

sprites · created 2026-09-16

64×74 pixel sewing machine head in section with three loops — the needle never goes through to the other side of the cloth, the hook does. The manual gives you two settings, a 2.2 mm rise and a 1.1 mm clearance, and they turn out to be one number written twice; the band between skipping early and skipping late is eleven degrees of shaft, which at 4,000 stitches a minute is half a millisecond.

physicssimulationpixel-artcanvas

Hand sewing pushes the needle through the cloth and out the other side. A machine cannot: the needle is bolted to a bar, and the bar has to come back.

So a machine does not sew the way a hand does. It ties a knot out of two threads, neither of which ever crosses to the other’s side of the cloth, and everything under the throat plate exists to tie it. The needle thread stays above. The bobbin thread stays below. They are locked together in the middle, once per stitch, at four thousand stitches a minute.

The sprite is the head in section: the take-up lever swinging in its slot, the needle bar in its bushing, a presser foot on five millimetres of cloth, and under the plate a rotary hook turning twice for every stitch around a bobbin that never moves at all.

The loop exists because the needle is going the wrong way

Going down, the thread rides in a long groove milled up the needle’s front and is carried cleanly. Coming back up, the thread on the other face — the scarf side, where the groove is short — is held by friction in the hole it has just made, and does not follow.

Every millimetre the needle rises is a millimetre of thread left behind, and a doubled thread with slack in it stands off the needle as a bight half that tall. The loop the hook catches only exists during the retreat. A needle that went down and stopped would never make a stitch, and neither would one that came straight back up through a hole it had not had time to grip.

Two settings, one number

Every lockstitch service manual gives you the same two figures:

the hook point meets the needle when the needle has risen 2.2 mm the point passes 1.1 mm above the needle’s eye

They look like two independent adjustments to make with two gauges. They are one number written twice. 2.2 mm of rise leaves 2.2 mm of slack; a doubled thread with 2.2 mm of slack in it stands 1.1 mm proud; and “1.1 mm above the eye” is the instruction to enter that bight right at its crest.

Which is a knife edge, and the piece is about what holds it off one.

The whole drawing is built from those two numbers, in this order — each line forced by the one above it, none of them a drawing decision:

quantitymmforced by
point crosses the needle at-9.400needle offset and point radius, nothing else
eye at bottom dead centre-6.100the point height, + 1.1 over + 2.2 of rise
needle point at bottom-4.600the eye, + 1.5
needle point at top-35.300the bottom, − the 30.7 stroke
throat plate-14.600the bottom of the stroke, − 10 of penetration
cloth, top face-19.600the plate, − 5 of cloth

Heights are from the hook’s axis, down positive. The meeting happens at 217.39° of the main shaft and the loop is cast off at 322.4°.

Both ways of getting it wrong are the same failure

Move the hook early and the point sails over a loop that has not grown yet. Move it late and the point drops below the eye, where it goes under the bight or into the thread. Both come out of the machine as a skipped stitch, and the band between them is narrow:

hook timingrise at the meetingbightpoint over eyeverdict
-24°1.01 mm0.99 mm2.29 mmearly — the point passes over the crest
-12°1.55 mm1.29 mm1.75 mmearly — the point passes over the crest
-8°1.75 mm1.38 mm1.55 mmearly — the point passes over the crest
-6°1.86 mm1.42 mm1.44 mmearly — the point passes over the crest
-4°1.97 mm1.46 mm1.33 mmsews
2.20 mm1.53 mm1.10 mmsews
+4°2.44 mm1.60 mm0.86 mmsews
+8°2.70 mm1.66 mm0.60 mmsews
+12°2.97 mm1.72 mm0.33 mmsews
+16°3.25 mm1.78 mm0.05 mmsews
+17°3.33 mm1.79 mm-0.03 mmlate — the point is below the eye
+20°3.55 mm1.82 mm-0.25 mmlate — the point is below the eye
+26°4.02 mm2.01 mm-0.72 mmlate — the point is below the eye

-5.7° … +16.6° of hook rotation — 22.25° wide, which is 11.13° of the main shaft, over a needle rise of 1.88 to 3.30 mm. Note where the book setting sits in it: five degrees off the early edge and sixteen off the late one. Nearly all the margin is on the late side, because the late edge is something else entirely — it is the needle’s own eye, and a point set past it does not miss the thread, it hits it.

And the window is not a leisurely thing:

stitches / minone turnthe window
200300.00 ms9.271 ms
100060.00 ms1.854 ms
200030.00 ms0.927 ms
300020.00 ms0.618 ms
400015.00 ms0.464 ms
550010.91 ms0.337 ms

At a factory’s running speed the entire event — bight up, point in, thread committed — has to land inside a third of a millisecond, five thousand times a minute, on a machine you oil with a can.

What holds the book setting off the edge

If the bight were only ever half the rise, the book setting would sit exactly on the early edge: 1.1 mm of crest against a point arriving at 1.1 mm. It does not, because the take-up lever is still descending at the moment of the meeting and is still paying thread out. How much of that reaches the loop is the job of the check spring — the little coil on the tension post that holds the thread taut while the needle is down and lets go when it has run out of travel.

So the check spring stroke, which no one thinks of as a timing adjustment, is one:

check springslack past it at the meetingbightwindow (hook°)the book setting
0.0 mm2.86 mm2.53 mm-19.6 … 16.6sews
1.0 mm1.86 mm2.03 mm-12.5 … 16.6sews
1.5 mm1.36 mm1.78 mm-9.0 … 16.6sews
2.0 mm0.86 mm1.53 mm-5.7 … 16.6sews
2.5 mm0.36 mm1.28 mm-2.4 … 16.6sews
2.9 mm0.00 mm1.10 mm0.0 … 16.6early — the book setting no longer catches
3.0 mm0.00 mm1.10 mm0.0 … 16.6early — the book setting no longer catches
4.0 mm0.00 mm1.10 mm0.0 … 16.6early — the book setting no longer catches

There is 2.86 mm of payout at the meeting to be shared out. Wind the spring past that and nothing at all gets through, the bight falls back to exactly half the rise — 1.10 mm, against a point arriving at 1.10 mm — and the machine starts skipping with the hook timed exactly as the manual says. The identity that made the two settings one number is also the cliff the machine falls off.

That is the piece’s actual finding. The two famous numbers are not a spec, they are the edge of a spec, and the margin you sew on comes from somewhere else.

The other thing: how much thread moves

The loop has to open wide enough to pass a whole bobbin. Nobody says this out loud, and it is the most startling number in the machine:

whatmm
thread below the eye, at its most95.30
…and at its least0.12
so the hook asks for, and gives back95.18
the take-up lever and needle bar return52.07
the seam keeps (2.5 stitch + two passes through the cloth)7.50

12.7 to 1. Nearly a hundred millimetres of thread is dragged down under the plate and hauled back up, every stitch, so that seven and a half millimetres can stay. At 4,000 stitches a minute that is 6.3 metres of thread a second going through the hook, to lay half a metre of seam.

It is also what the take-up lever is for. A lever, and not a roller, because it sits between two fixed anchors — so moving its eye a millimetre changes the road by nearly two, and one swing can pay out and reclaim the tens of millimetres the hook is about to demand. Watch the two curves trade in the demo: the lever bottoms out exactly as the loop starts opening, and starts climbing before the loop is cast off.

shaftthread below the eyethread in the armwrapwhat is happening
19.7 mm115.7 mmneedle at the top, knot set
90°1.7 mm99.8 mmneedle coming down
180°11.0 mm68.0 mmbottom dead centre
217°8.8 mm65.1 mmthe meeting
240°29.4 mm67.7 mm45°loop opening around the case
300°84.5 mm91.1 mm165°loop past the widest point
330°17.0 mm106.5 mmcast off, take-up hauling

The drop between 300° and 330° is not the loop easing off. It is the loop slipping off the hook’s tail and the take-up whipping the entire ninety millimetres back up in a fraction of a turn. That snap is the sound a sewing machine makes.

And where the knot ends up

Two tensions pulling on one knot, so the knot goes wherever they balance:

top tensionbobbin tensionknot depthwhat a sewer would call it
80201.00 mm (20%)bobbin thread showing on top
65351.75 mm (35%)balanced
50502.50 mm (50%)balanced
35653.25 mm (65%)balanced
20804.00 mm (80%)needle thread looping underneath

This is the one part of the machine every sewer already knows by its symptom and not its cause. “Loops on the underside” is never a bobbin problem; it is the top tension being too loose to pull the knot up out of the cloth. The cross-section in the sprite says so directly — the seam behind the needle carries the knot at whatever depth the two sliders have agreed on, and it moves while you drag them.

The bight is one pixel, and that is the right size for it

At 0.85 px/mm a 1.1 mm bight is one pixel tall. The sprite draws it at one pixel, because that is how big it is, and because a machine whose whole behaviour turns on something you cannot see at working scale is worth saying plainly.

The demo carries a loupe — the same instant at 9 px/mm, eleven millimetres across — with the needle’s groove and scarf, the bight drawn as the doubled thread it is, and the point coming round on its own circle. Two bars beside it give the only comparison that matters: the crest of the bight, and the height the point actually arrives at. Every position in the loupe is read from the same functions that draw the sprite; nothing is re-posed for the close-up.

Reuse

source/lockstitch.mjs is framework-free, with no canvas in it. The machine is authored in millimetres and toPx is the only thing that knows about pixels.

The demo is demo/index.html with its own copy of the module (ADR-0002). It sizes itself to its viewport, so the site’s full-screen button just works.

What is derived here, and what isn’t