Ulzii · endless knot
One unbroken band on an odd grid of crossings, alternating over and under. The 3 × 3 grid is the classic knot (knot type 7₄). Mongolian ornaments drawn by their rules, not by eye. Set the parameters, then download SVG or PNG.
CSS for a bordered box
Save the SVG next to your stylesheet as alkhan.svg, then give any box these two lines. The border tiles to fit.
Use it as an image URL
Every setting is in the address. The same settings under /api return the image itself, so the link works in an <img> tag or a stylesheet.
How it is drawn
The knot is a weave on a square grid. An odd number n of rows and columns cross n² times, and each row and column runs out to two loose ends: 4n ends in all.
Going round the grid, neighbouring ends are joined in pairs by loops. With an odd number of ends on each side, exactly two pairs have to wrap a corner. Those are the two small ears.
At the crossing in row i and column j, the vertical band goes over when i + j is even. The band then alternates over and under all the way round. The 3 × 3 grid is the knot listed in knot tables as 7₄: drawn with 9 crossings, 2 of which are the twists of the ears. An even grid never closes into one band.
The rules, their sources and the checks behind them are written up in the repository. Source code and documentation (MIT) · What the palettes mean, and their sources