Converting Data Into Weaving Drafts
A weaving draft has four core structures:
- Threading: which shaft each warp thread passes through (1 row per warp end)
- Tieup: which shafts each treadle controls (matrix of shafts x treadles)
- Treadling: the sequence of treadles pressed (1 row per weft pick)
- Drawdown: the derived over/under fabric pattern (computed from the three above)
Minimal text-to-draft encoding (name-drafting style):
Pythondef text_to_threading(text, num_shafts=8): # Map each letter to a shaft number (A=1, B=2, ... wrap at num_shafts) return [(ord(c.upper()) - ord('A')) % num_shafts + 1 for c in text if c.isalpha()] def compute_drawdown(threading, tieup, treadling): import numpy as np drawdown = np.zeros((len(treadling), len(threading)), dtype=int) for pick_idx, treadle in enumerate(treadling): active_shafts = {s for s, pressed in enumerate(tieup[treadle], 1) if pressed} for end_idx, shaft in enumerate(threading): drawdown[pick_idx, end_idx] = 1 if shaft in active_shafts else 0 return drawdown
Progress:
- Choose source data type (text/name, image, log/data stream, or manual design)
- Select encoding scheme (letter-to-shaft, pixel-to-block, event-to-pick)
- Generate threading sequence from encoded data
- Generate or select a tieup matching target weave structure (plain, twill, summer-and-winter, damask, etc.)
- Generate treadling sequence (often mirrors threading for symmetric structures, or encodes a second data stream)
- Compute drawdown and validate it's weavable (no floats longer than loom tolerance, correct shaft count)
- Export to WIF or JSON
- (Optional) Render drawdown as image/3D visualization
Step details:
-
Pick the encoding. Text/names → letter-to-shaft mapping (classic "name draft" algorithm, often reusing threading pattern for treadling so the name reads twice). Images → sample pixel blocks and map intensity/color to block-weave units (summer-and-winter, taqueté, double cloth). Logs/time-series → map each discrete event (e.g., one log line = one pick) to a treadling row, encoding event type as shaft/treadle choice.
-
Respect shaft/treadle limits. Real looms range from 4 to 40 shafts; decide the shaft count up front and reduce/modulo your data to fit (
value % num_shafts + 1). -
Pick a structural tieup. Don't invent tieups ad hoc unless intentional — reuse known weave structures (plain weave, straight/point twill, summer-and-winter) so the physical cloth is weavable and holds together. Validate no unsupported "floats" (a warp or weft thread skipping too many opposite threads unsupported).
-
Compute and sanity-check the drawdown before export — verify dimensions match (picks x ends), and spot-check a known pattern region.
-
Export WIF (a plaintext INI-style format with
[WEFT],[WARP],[TIEUP],[THREADING],[TREADLING]sections) or JSON for web tools. WIF is the interchange standard most desktop/loom software reads.
Example 1: Name into threading/treadling
Input: "ADA", 8 shafts
Output: threading = [1, 4, 1] (A=1, D=4, A=1); treadling reuses [1, 4, 1] so the drawdown shows the name pattern both in warp and weft direction, common in historical "name draft" coverlets.
Example 2: Log entries into picks
Input: 24 hourly log entries, categorized as ERROR/WARN/INFO
Output: Each hour becomes one treadling row; event category maps to one of 3 treadles tied to overlapping shaft groups on an 8-shaft tieup, so error-heavy periods appear as a visually distinct block in the woven cloth.
Example 3: Image to block draft Input: 10x10 grayscale image, threshold at 50% gray Output: Each pixel → one block unit; dark pixels = summer block (shafts 1-2 tieup), light pixels = winter block (shafts 3-4 tieup), producing a double-faced reversible cloth pattern.
- Always fix shaft/treadle count before encoding — it determines the modulo/bucket size for all mappings.
- Reuse proven weave structures (plain, twill, summer-and-winter, damask) as the tieup; don't generate random tieups, they often produce unweavable floats.
- When "reading data back out of cloth" is a goal (e.g., text2cloth), keep the encoding reversible: one data unit = one thread/pick, no lossy aggregation.
- Validate float length (max consecutive threads lifted without interlacing) against material constraints — typically no more than 4-6 threads for most yarns.
- Prefer WIF for interchange with existing loom software; use JSON only for custom web/visualization tools.
- When mapping a continuous source (image, audio) to discrete draft units, downsample/quantize deliberately and document the mapping so the pattern is reproducible.
- Don't ignore shaft/treadle hardware limits (most home looms: 4-16 shafts) — a drawdown that needs 40 shafts is unweavable on typical equipment.
- Don't generate a tieup without checking for unsupported floats — this produces designs that look fine on screen but fail physically.
- Don't conflate threading and treadling meaning — threading is a per-warp-end static assignment, treadling is a per-pick sequential choice; swapping them silently breaks the pattern.
- Don't skip drawdown validation before export — catch dimension mismatches (threading length vs. drawdown columns) early.
- Don't assume one universal letter-to-shaft mapping — historical name-draft algorithms vary (some use musical/numeric alphabets); pick one and state it explicitly.