Tilings and mosaics

Weaves

Cloth from a weave draft: plain, twill, satin, basket, herringbone, houndstooth and tartan — rounded threads dipping under each other.

  • GPU shader
  • seamless tile
Open in the editor →

Every cloth is two sets of threads: the warp stretched lengthwise and the weft passed across it, and at every crossing one of them lies on top. The order of these overs and unders is the weave, and it decides whether the same yarn becomes calico, denim or satin.

How it works

Weavers draw a weave on squared paper, a filled square meaning “warp on top”. The pattern repeats periodically, and the generator keeps one formula per weave in warp number i and weft number j.

warp on top at crossing (i, j) if plain: (i + j) mod 2 = 0 twill 2/2: (i + j) mod 4 < 2 satin n/s: (i − s·j) mod n ≠ 0 gcd(s, n) = 1, 1 < s < n − 1: 5/2, 8/3

In a twill each thread's floats are shifted by one from the last, so diagonal ribs run across the cloth; denim is usually a 3/1 twill. In a satin the weft binds the warp only once in n threads, at scattered points, and the long smooth floats give the sheen. The conditions on s explain why no regular satin exists on 4 or 6 shafts. Herringbone is a twill that reverses every six threads, basket a plain weave with paired threads. Houndstooth is not drawn at all: it is a 2/2 twill with four dark and four light threads alternating in warp and weft, and the jagged “teeth” appear by themselves. With “Tartan” on, warp and weft share one symmetric stripe sequence, the sett, mirrored about two pivots as in a real tartan. Threads are shaded as cylinders dipping under their neighbours between crossings.

A bit of history

In 1804 Joseph Marie Jacquard built a loom in which a chain of punched cards lifted the chosen warp threads: one card per pass of the weft. Charles Babbage borrowed the cards for his Analytical Engine, and in 1843 Ada Lovelace wrote that it “weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves”. Tartan was once banned: after the Jacobite rising of 1745 the Dress Act of 1746 forbade Highlanders to wear it, and the ban lasted until 1782.

What to tweak

  • Turn “Tartan” off, lower “Threads” and step through “Weave” to watch one formula change the texture.
  • “Houndstooth” without “Tartan”, with contrasting “Warp colour” and “Weft colour”, gives the classic jacket check.
  • “New seed” invents a new tartan; “Sett scale” makes the check larger or smaller.
  • Few “Threads” with plenty of “Fuzz” and “Gap” make coarse sacking; many threads and less “Relief” make fine broadcloth.
  • Switch to seamless tile mode for a cloth texture for 3D, and lay “Celtic knots” on top like embroidery.

Parameters

Weave
plain · twill 2/1 · twill 2/2 · twill 3/1 · satin, 5-harness · satin, 8-harness · basket 2/2 · herringbone · houndstooth
Threads
Threads across the short side
Warp colour
The lengthwise threads (with tartan off)
Weft colour
The crosswise threads (with tartan off)
Tartan
Warp and weft follow the same stripes of palette inks
Sett scale
How wide the tartan stripes are
Gap
Space between threads
Relief
Shadows and highlights on the threads
Fuzz
Fibres, twist and fuzzy thread edges
Rotation
Ignored in seamless tile mode