Zelij Digital Jacquard
Algorithmic translation of traditional Moroccan geometric patterns into machine-knitted jacquard fabric.
- What I built: A computational pipeline to convert binary patterns into double-bed jacquard knit structures.
- Why it matters: Bridges heritage craft with digital fabrication, enabling rapid translation of complex geometries.
- Proof: Successfully fabricated reversible jacquard textiles on Shima Seiki industrial machines.
Problem / Goal
Zelij (زليج) refers to the intricate geometric tilework that has defined Moroccan architecture for centuries. These patterns—often featuring tessellating stars and polygons—embody a sophisticated mathematical design language.
The goal of this project was to translate these traditional patterns into contemporary digital fabrication. The core challenge was maintaining pattern fidelity while translating high-resolution geometric designs into the discrete, physical constraints of industrial knitting (mapping pixels to stitches across two needle beds).
My Contribution
I developed the end-to-end computational pipeline (chamomile.js) that parses binary
pattern images and generates low-level machine instructions (Knitout). I also managed the material
fabrication on Shima Seiki machines, iterating on tension and carrier settings to achieve a stable
double-jacquard structure.
Technical Approach
1. Pattern Processing
The workflow begins with selecting a tiling zelij motif (e.g., an eight-pointed star). The pattern is algorithmically multiplied to create a seamless repeat and formatted as a binary (2-color) PNG map, where pixel dimensions directly correspond to fabric stitches and courses.
2. Pixel-to-Stitch Algorithm
I wrote a custom JavaScript tool to process the image data. The algorithm performs a serpentine
traversal (zigzag) of the image pixels and issues knit commands.
Crucially, it implements Double Jacquard logic: for every pixel row, the machine makes two passes (one for the backing color, one for the pattern color), ensuring a reversible fabric with no long floats.
// Example of color mapping logic
function do_carrier(carrier, character) {
if (side[carrier] === '+') {
// Knit Left
for (let i = max; i >= min; i -= 1) {
if (color_choice[i-min] === character) {
console.log(`knit - f${i} ${carrier}`);
} else {
console.log(`knit - b${i} ${carrier}`);
}
}
side[carrier] = '-';
} else {
// Knit Right (logic mirrored)
// ...
}
}
3. Knitout & Visualization
The script outputs Knitout code, a machine-agnostic knitting language. I verified these instructions using a visualizer to check for dropped stitches or carrier collision issues before physical fabrication.
Validation / Results
The pipeline was validated by producing physical textile artifacts. The resulting fabric exhibits high pattern fidelity with crisp geometric lines. The double-bed structure provides stability and thickness suitable for upholstery or soft goods.
Lessons + Next Steps
Key Insight: Serpentine traversal (zigzag knitting) significantly reduced carriage travel time compared to unidirectional knitting, optimizing production speed.
Next Steps: The current system is limited to 2-color binary patterns. Future work will extend the algorithm to support 3+ color jacquard using multiple yarn carriers and dithering techniques for gradients.