Celtic Knot Generator

Place the breaks, and the weave follows.

  • Over and under by rule
  • Counts the strands
  • Vector export
A grey stone slab carved with a square panel of interlaced knotwork, lit from the side, with moss growing around its edges.

The guide

A Celtic knot is a plait with a few crossings taken out, and the weave never needs deciding

Draw a plain plait on a grid of dots, swap some crossings for small walls, and the bands close into knotwork whose over and under pattern follows from one rule.

  • gcd(p, q) strands in a plain plait of p by q cells
  • 2pq - p - q crossings in that plait before any break
  • -1, 0 or +1 change in the strand count from one break
  • 3 crossings left by one break in a 2 by 2 plait: the trefoil
  • A.D. 712 earliest dated knotwork in Allen's Italian examples
Read the full guide Fold the guide 8 min · 13 sources

The knotwork on an early medieval cross slab looks like the hardest thing a carver could attempt. Bands dive under and over one another dozens of times and never lose their place. It is far more orderly than it looks.

J. Romilly Allen set out the reason in 1904, in a survey of Celtic art that is still the place the argument starts. The plait, he wrote, was the first kind of interlaced work used for decoration, and it was of Classical origin, familiar in Britain from Roman pavements such as the one at Lydney Park in Gloucestershire. In Egyptian, Greek and Roman art the plait is the only interlace there is. Everything more complicated, up to the pages of the Book of Kells, he traced to one discovery: that new patterns can be devised from a simple plait by making what he called breaks.

From a plait to a knot

Allen also tried to date the discovery. He found no break in any plait on the mosaic pavements of Roman Britain, and none on a marble screen in Rome dated between 514 and 523. Knotwork proper, with dates he trusted, appears in northern Italy at Valpolicella in A.D. 712 and at Cividale in 737, so he put the change between 563 and 774. Later writers are more careful. Gwen Fisher and Blake Mellor, two mathematicians who studied these designs, call his account one popular theory and say the history is still a subject of debate.

The spread is not in doubt. Braided patterns appear on late Roman mosaic floors and in Coptic manuscripts and textiles of the fifth and sixth centuries. They are a key feature of Migration period art in northern Europe and come to full flower in the Insular art of Britain and Ireland. The Lindisfarne Gospels were probably made around 715 to 720. In Angus, the cross slab in the churchyard at Aberlemno carries a cross whose upright arms hold three separate knotwork designs, with animal designs in the same manner along its border.

Nor is the idea confined to one corner of Europe. Geometric interlace is common in Islamic ornament, where, as Fisher and Mellor note, the pattern is often part of an endless plane and some strands never close into loops at all. Slavik Jablan gathered a wider family under the name mirror curves. It includes the threshold designs that Tamil women draw in rice flour around a frame of evenly spaced dots, and the sand drawings of the Tchokwe people of northeast Angola, which start from a net of points pressed into smoothed ground.

What the insular designs meant to their makers is another matter. Fisher and Mellor call the symbolism a fascinating and unresolved issue. Of the claim that a single unbroken strand stood for eternity, they say there is no clear evidence one way or the other.

The grid, the dots and the breaks

The construction itself is plain. Jonathan Gross and Thomas Tucker describe it with nothing but a lattice. Take a rectangle of square cells and put a dot at the middle of every cell edge. Inside each cell, join the four dots on its edges into a diamond, as Fisher and Mellor do. Two diamonds meet at every dot that lies between two cells, and there two bands cross. At a dot on the outer edge there is only one diamond, so the band turns back into the panel. Thicken the lines into ribbons and the result is the plain plait: every interior dot a crossing, every edge dot a turn.

A break changes one dot. Allen’s description cannot be bettered. Cut the two cords where they cross, which leaves four loose ends, and join the ends in pairs. That can be done in two ways only, he says, giving a vertical break or a horizontal break. Gross and Tucker call the same move installing a barrier: a short wall through the dot, upright or level, that both bands turn away from. In the tool, tapping a dot steps it through crossing, horizontal break and vertical break.

How the original artists set out their work is not recorded. Andrew Glassner, writing about drawing knotwork by computer, credits the art teacher George Bain with publishing a simple method of construction in 1951. He adds that Bain’s principles are surprisingly algorithmic.

The curves are a choice, not a rule. Here a band runs straight along the diagonal through a crossing and takes a quarter circle around a break, or comes to a point if you prefer the sharper style.

Why over and under always works

The weave is settled by one sentence in Gross and Tucker. At a dot whose horizontal position is odd, the band rising from lower left to upper right goes over; at a dot whose position is even, the falling band goes over. In a grid of cells that means rising over falling on the top and bottom edges of a cell, and the reverse on its sides. Follow any band and the reason appears. Each step along a diagonal carries you from one kind of dot to the other. A break also flips rising to falling. Between one crossing and the next, the two effects never cancel, so over is always followed by under.

Gross and Tucker state it as a theorem: every design made this way is alternating, because a plain grid is, and installing a barrier keeps it so. Nothing has to be decided crossing by crossing, and nothing can go wrong. The tool still checks every crossing of every strand each time the design changes.

Knot theory has a name for this property. An alternating knot is one with a diagram whose crossings alternate between under and over. The trefoil and the figure eight are alternating, as are all prime knots with seven or fewer crossings; the first three exceptions appear at eight. Gross and Tucker proved the converse of their theorem as well: every alternating diagram of a knot or link is equivalent to some design on this grid. P. G. Tait, who took up knots in response to Kelvin’s idea that atoms were knotted vortex tubes, conjectured that reduced alternating diagrams have the fewest crossings possible. The claim was finally proved in 1987.

So the method is narrower than knots in general and exactly as wide as the alternating ones. A knot with no alternating diagram cannot be drawn by this rule.

Counting the strands

How many separate loops does a design contain? For the plain plait there is a clean answer. Fisher and Mellor prove that a panel of p by q cells has gcd(p, q) strands, the greatest common divisor of its sides. Their argument follows an ant along one band. It travels one unit down for each unit across, so it returns to its start only after covering a distance both sides divide evenly. Counting how often each band touches the left edge gives the result. A panel of 4 by 6 has two strands, and one of 12 by 15 has three.

Crossings are easier still. Gross and Tucker give the count for a panel of m by n cells: crossings plus breaks always add up to 2mn - m - n, which in the letters used above is 2pq - p - q. A panel of 6 by 6 has 60 dots between cells. The square panel the tool opens with has 8 breaks, and therefore 52 crossings.

Breaks are where formulas stop. Fisher and Mellor say plainly that they have not begun to analyze them. Jablan gives the local rule instead. A break placed where two different strands cross joins them into one. A break placed where a strand crosses itself either leaves the count alone or splits the strand in two, depending on which way the wall runs. One break therefore changes the strand count by -1, 0 or +1 and never by more. Tracing every strand of every break pattern on grids up to 3 by 3 cells confirms the rule without exception.

Try it on the smallest case. Set the grid to 2 cells wide and 2 high with no breaks. The tool reports 2 strands, as gcd(2, 2) predicts, and 4 crossings, which is 2 times 2 times 2, less 2, less 2. Each strand is 5.05 cells long. Now choose the Trefoil preset, which puts one vertical break on the left-hand dot. The two strands join: 1 strand, 3 crossings, 9.80 cells long. That is the trefoil, the only prime knot with three crossings. Tap the right-hand dot once for a horizontal break and one strand remains with 2 crossings. Tap it again for a vertical break and the strand splits in two.

Symmetry deserves one caution. Mirror the breaks and the paths of the bands mirror with them, but the weave does not: a reflection turns every over into an under, as Gross and Tucker point out. A half turn or a quarter turn leaves the weave exactly as it was.

Drawing one by hand, and where the method stops

The second page of the PDF is a construction sheet in three stages: the dots, then the breaks, then the bands. On paper the order matters. Mark a dot at the middle of every cell edge. Draw each break as a short wall through its dot, and wall off the outer edge. Then run a pencil diagonally from dot to dot, turning at every wall. Allen’s advice still holds: the setting-out lines ought really to be double, so as to define the width of the band.

The method has edges, and it is as well to know them. It makes alternating weaves on a square grid and nothing else. Allen’s own list of interlace runs to six classes, among them circular knotwork, triangular knotwork and ringwork, and those need other constructions. Bands here can be at most 28 percent of a cell wide, or the two that turn at the same break would touch. And a grid says nothing about beasts, foliage, or why a pattern was chosen. Fisher and Mellor admit that even a relatively simple knotwork design exceeds their methods of analysis.

That is a fair place to stop. A few walls on a field of dots, one rule about rising and falling, and the rest follows.

Sources

Every source consulted for this guide. Links checked October 7, 2026.

  1. A Celtic Framework for Knots and Links Jonathan L. Gross and Thomas W. Tucker, hosted by Columbia University
  2. On the Topology of Celtic Knot Designs Gwen Fisher and Blake Mellor, Bridges 2004, The Bridges Archive
  3. Mirror Curves Slavik Jablan, Bridges 2001, The Bridges Archive
  4. Celtic art in pagan and Christian times J. Romilly Allen (1904), Internet Archive
  5. Celtic Knotwork, Part I Andrew Glassner, IEEE Computer Graphics and Applications (author's copy)
  6. Mirror-Curves and Knot Mosaics Jablan, Radovic, Sazdanovic and Zekovic, arXiv
  7. Alternating knot Wikipedia
  8. Tait conjectures Wikipedia
  9. Trefoil knot Wikipedia
  10. Knot theory Wikipedia
  11. Lindisfarne Gospels Wikipedia
  12. Aberlemno sculptured stones Wikipedia
  13. Interlace (art) Wikipedia