Zillij
Zillij is a browser studio for Islamic geometric design, built for muqarnas glass-casting molds. You lay down circles and polygons as construction, draw the pattern lines between their crossings, cut away what you don't need, repeat it with symmetry, then finish it as colored regions or interlaced bands and export SVG for Rhino or Illustrator. It runs entirely in your browser; nothing is uploaded.
Getting started top
Video tutorials
01 · Intro to Zillij and the Shapes tool
02 · Connect Points and Cut Lines
03 · Select tool and layers
04 · Tiling and finishing
05 · Working with symmetry
The videos cover the fundamentals. This reference describes the current interface, including tools added since they were recorded.
The basic workflow
Zillij works in six stages. Each is a mode: switch with the icon strip at the top of the left panel or its key.
- Add construction. Place a circle at the origin (set Radius first) and a polygon at the same center. Keep them on the Construction layer; their crossings are where your pattern lines will start and end.
- Lock the Construction layer. Click its lock so cuts and drags can't touch it, and lower its opacity to 15 to 20% so it stays visible for snapping without crowding the design.
- Connect Points. Switch to a new layer and draw lines between crossings. Turn on Symmetry to draw every rotated copy at once.
- Tile. In Tile mode, Radial repeats a sector all the way round; Tessellate repeats a tile across a grid.
- Cut Lines. Click segments to hide them. Cuts survive undo, redo and saving.
- Finish. Close small gaps, find closed regions to color, or make bands (mitered, woven, outline, overlap). Export SVG.
The interface top
Three zones: the left panel (mode strip and the current tool's settings), the canvas, and the right panel (Layers, Save / Load, Reference image, Export, Clean Up). The header runs across the top.
| Header control | What it does |
|---|---|
| Undo / Redo | Step back or forward (Cmd+Z, Shift+Cmd+Z or Ctrl+Y). |
| Fit | Zoom to fit what you can see (F). Hidden layers and cut-away construction are ignored, so the fit hugs your actual design. |
| Pick Center | Click a point to make it the shared symmetry center. Every rotating tool uses it: Propagate to N, Connect and Cut symmetry, Orbit, Tile Radial. A crosshair marks it whenever it isn't at the origin. Esc cancels. |
| Reset Origin | Puts the symmetry center back at (0, 0). |
| Grid · Isect · Fill | Show the background grid (on), intersection dots (off) and shape fills (off). |
| Snap | Opens the snap settings (see Snapping). |
| Dark / Light | Switches theme. Light mode uses a white canvas, dark construction ink and a darker set of layer colors. Remembered between visits. |
| ? Help | Opens this reference. |
| Coordinates | The cursor's position on the canvas. |
| + New Document | A blank canvas with the symmetry center reset. Asks first only if there is unsaved work. |
Navigation
- Zoom: scroll wheel, toward the cursor.
- Pan: Alt+drag, or drag with the middle mouse button.
- Deselect everything: right-click the canvas.
The welcome screen offers the five videos on first launch. Tick Don't show again to skip it; add ?welcome to the page address to bring it back. Confirmation dialogs answer to Enter (the highlighted button) and Esc (cancel). Drawing on a locked or hidden layer plays a short tone along with the warning.
Snapping top
Every click snaps to whichever target is nearest the cursor within the snap radius. A colored ring shows the target and a small badge names its type. There is no fixed priority: the closest wins.
| Snap toggle | Default | Snaps to |
|---|---|---|
| Origin | On | The origin (0, 0). |
| Intersections | On | Every crossing of shapes and lines, except where every line through it is cut. |
| Shape Centers | On | Shape centers, plus the midpoints of lines and polygon sides. |
| Grid | Off | Grid points; set the spacing with Grid Size (10 to 200). |
Some targets are always on: line endpoints, each circle's four compass points, arc ends, and points from Add Points. When nothing exact is close, the cursor also slides along the nearest circle, arc or line (cut spans are skipped), so you can land anywhere on a bare line.
Smart guides
While you drag a layer and nothing is in snap range, Zillij lines the grab point up with any shape center, line end, snap point or the origin that sits level or plumb with it, and draws a dashed guide. X and Y can align to two different points at once.
Add Points
A circle's Pts slider adds evenly spaced snap points around it (default 4); a polygon's Pts/side adds them along each side. They stay as snap targets even after the shape moves.
Add Shapes A top
Circles, arcs and regular polygons: the construction skeleton.
Circle
- Click to place at the current Radius.
- Or drag out the radius; release on a snap point for an exact one.
- The diameter shows under the Radius slider.
Arc
- Click 1: center. Click 2: radius and start. Click 3: end.
- Compass mode locks a radius: type it, keep the last arc's, or click Set and pick two points.
- Takes the short way round; Shift+click the end for the long way.
- Esc steps back one click.
Polygon
- Sides (3 to 64) sets its natural angle; Angle turns it. Keys 3 to 9, 0 (10) and = (12) set Sides while the Polygon tab is open.
- Each side is placed as its own line, so it can be cut, extended or deleted on its own.
- R | Side sizes it by circumradius or by side length. In Side mode the side length stays put when you change Sides, so every polygon shares one edge length.
- Pts/side (0 to 12) adds snap points along each side.
Attach to edge
Turn on Attach to edge (or press E) and hover a straight line: a ghost of the next polygon grows off it, sharing that edge exactly.
- The side your cursor is on picks the direction; the edge length becomes the side length.
- Edges that already exist are reused, never doubled. Hold Alt to attach to just the piece of a line between two crossings.
- A red ghost means it would cross an existing line.
- Corner labels name the angles meeting at each corner: 3.4.6.4 ✓ in green closes the full 360°; 4.3 · 210° open in amber shows what is left.
- Propagate to N applies: one attachment places N rotated copies.
Radius
The slider runs 1 to 2000; type any value for precision. After you measure a segment in Cut Lines, Use last segment as Radius applies its length, and Alt+click on a segment in Cut Lines captures it directly.
Propagate to N
Every shape you place is copied to N equal positions around the symmetry center (2 to 64, default 6): all the petals of a rosette in one click. N is shared with the other tools' symmetry settings. Place at Origin (0, 0) drops the current shape exactly on the origin.
Select and move S top
The Select panel opens with a row of icons: Select Layer (Cmd+A selects everything), Clear, Duplicate, Delete, and the layer tools Scale, Rotate and Mirror. The layer tools wake up once a layer is selected, and only one runs at a time. A selected layer also shows a small toolbar above its dashed box with the same tools.
| Action | Result |
|---|---|
| Click a shape | Selects it. |
| Drag on empty canvas | Selects everything inside the rectangle. |
| Shift+click | Adds to or removes from the selection. |
| Double-click a shape | Selects its whole layer. |
| Delete | Deletes the selection. |
| Right-click or Esc | Deselects and cancels whatever is in progress. |
Moving
- Drag a selected shape; it snaps to crossings.
- Double-click to select a layer, then drag inside its dashed box to move the whole layer. Clicking outside the box deselects it.
- The key point nearest your click (a line end or shape center) is the grab point: it snaps, not the raw cursor. With nothing in range, smart guides line it up.
- Shift keeps the drag level or plumb. Arrow keys nudge a selected layer; Shift makes the step 10 times bigger.
Rotate, orbit, scale and mirror a layer
These act on the selected layer. To repeat the whole canvas, use Tile mode instead.
Rotate
- Set the angle (1 to 180°, default 15) and turn the layer either way in place.
- Rotate and Align: click a pivot, click a point on the layer, then click a target; the layer swings so the point lands on it.
Orbit
- Copies (2 to 64, default 6).
- Pick Center and Orbit, then click the orbit center: N−1 turned copies are added, to the same layer or (with Make new layer) a copy.
Scale
- Click 1: center. Click 2: a reference point.
- Move to scale live (new distance over the reference distance); click a snap point to lock.
Mirror flips the selected layer: H Flip and V Flip instantly; Origin Angle flips across a line through the origin at the angle you set (with a preview of the axis); Define Flip Axis flips across a line through two points you click. Make new layer flips a copy and leaves the original alone. Esc cancels any of these and puts the layer back.
Connect Points C top
Draw the pattern lines between snap points. These are the visible design, separate from construction.
| Sub-mode | How it works |
|---|---|
| Draw | Click a start point, then an end point. Click empty canvas to cancel a line in progress. |
| Align and Trim | Click two points to set a direction (the line runs out to the edges of the drawing both ways), then two more to keep just the piece between them. |
| Select Line | Click a line to select it and open Extend. |
Through-line
With Through-line on, a drawn line runs on past both of its points to the outermost crossing each way. It is stored as three pieces (left extension, middle, right extension), each cuttable on its own.
Symmetry, Extend and line style
- Symmetry (Propagate to N): draws N turned copies of every line; All copies or Every other.
- Extend: select a line (Select Line, or Alt+click from any sub-mode). Extend grows it backward or forward to the next crossing; Extend Both Ends does both. Symmetric partners that will extend too show in orange.
- Color comes from the active layer's color dot. Weight (0.5 to 8) sets new lines on the layer and restyles selected ones; Apply Weight to All Lines on Layer restyles every line on it.
Line at an angle
Turn on Generate Line at Angle in the Connect panel to draw one line at an exact angle to a reference direction.
- Click P1, the start of the reference direction.
- Click P2, where the new line starts.
- Click P3: the end, held at the set angle from the P2→P1 direction and snapping to the nearest crossing along it.
The angle runs from −180° to 180°, with buttons for 30, 45, 60, 90, 120 and 150°. Which side of the P1→P2 line the mouse is on picks which way the angle turns. The tool switches itself off after one line.
Cut Lines X top
Cuts are never destructive. A cut segment shows as a faint ghost and is left out of regions, bands and export; click it again to restore it.
- Hover a segment: it glows red and its length shows in the banner.
- Click to cut it.
- Click the ghost to bring it back.
Symmetric cut
- Turn on Propagate to N with an N, a Tolerance (1 to 30, default 8) and All or Every Other. Hovering a segment shows its partners in orange; one click cuts them all.
- Partners are found by rotation about the symmetry center. Include mirror reflections also matches mirror images; set Mirror axis to how the design was flipped.
- Curves only match curves and lines only match lines, so a cut on a circle never takes out a straight line by accident.
- Locked layers are protected.
Clicking a circle or arc cuts the whole span between its two nearest crossings. Alt+click a segment to send its length to Radius in Add Shapes.
Tile T top
Tile has two tabs: Tessellate (opens first) and Radial. Both skip hidden layers, so hide anything you don't want repeated.
Radial
Turns everything on the canvas around the symmetry center. Set N-fold (3 to 64, or the 4, 5, 6, 8, 10, 12, 24 buttons); a readout shows the degrees per copy and the common name. Preview shows the result without committing; Apply commits, carrying every cut to every copy.
Tessellate
Repeats the selected layer (or the whole canvas when nothing is selected) across a grid.
| Grid | Layout |
|---|---|
| Square | Rows and columns; set Step X and Y to your tile's size. |
| Hex | A hexagonal lattice with offset rows; Auto-detect reads a six-sided outline. |
| Rhombus | A slanted lattice; Angle (10 to 80°) sets the slant, and Diamond sets 45°. |
| Triangle | An equilateral triangle grid; every other row is turned 180°. |
- Auto-detect from shape reads Step X and Y from your geometry.
- Cols and Rows (1 to 10, default 2) set a finite grid. Step X / Y run 10 to 2000.
- Nudge X / Y add an offset each row or column, for interlocking repeats. Alt. Row/Col Offset shifts every other row or column (½ gives a classic brick bond).
- Cluster buttons build a small group in one click: 7-up Super-Hex, 4-up Super-Square, 3-up Super-Triangle.
- Preview, then Apply; cuts in the tile carry to every copy.
Tile alignment points
The quickest way to an exact Step X and Y when a tile isn't a simple rectangle: pick a point on one tile and the point on its neighbor that should land on it.
- Choose the grid type and click Set Tile Alignment Points. A 2 × 2 preview opens.
- Click 1: on the bright tile, click a landmark such as a star tip or a meeting point.
- Click 2: the neighbor comes forward. Click the point on it that should meet your first point.
- Step X and Y are solved and the preview updates. Apply when it looks right.
Scroll and Alt+drag work inside the preview; Esc cancels without changing anything.
Finish B top
Finish turns your line work into something to color or cut. Two tabs: Bands (opens first) and Regions. Both use visible, unlocked layers only.
Closed regions
- Close gaps: set a tolerance and click Run. The status line shows open line ends and the closest gap, so you can judge whether to raise the tolerance or join a gap by hand.
- Find Closed Regions finds every enclosed face and fills it with color.
- Regroup sorts regions by side count and size (tune Max groups and Max sides), so matching tiles share a color.
- To repaint by hand, click a swatch, then click regions on the canvas. Click a swatch's chip to change its color.
Show fills hides or shows the color without losing the regions; Clear Regions removes them. Triangulate fans each region into triangles from its center onto a new Triangulated layer (running it again replaces the old result).
The color picker has a hue strip, a saturation and brightness square, a hex field, your Recent colors and a row of glaze-inspired Preset colors. Click outside or press Esc to close it.
Bands
Turns every visible line, circle and arc into a band on a new layer: two offset lines either side, with joins that depend on the style. This is the relief look used in muqarnas panels.
| Style | Result |
|---|---|
| Mitered | Full-width bands with beveled joins: spokes from each junction to the band corners give a carved, three-dimensional look. Dense hubs (five or more bands, as at a rosette's center) get clean mitered corners without spokes. |
| Woven | Ribbons that go over and under at every crossing, the lower strand gapped beneath the upper. A line ending on a circle counts as a crossing too. |
| Outline | Just the outline of the band network: a clean double line, open at every crossing, with short loose ends removed. |
| Overlap | Outlines plus a center line, all running straight through every crossing, so the strands look stacked. |
- Width (1 to 100, default 15). For Mitered and Overlap it is each side of the center line (total = 2 × Width); for Woven and Outline it is the total. Nudge Width after switching style.
- Preview shows the bands without committing (then Refresh Preview); Create commits them as a new layer named for the style and width, such as Outline Bands W30.
- Woven review: after previewing, click a crossing marker to swap which strand goes over; flipped crossings turn gold. Propagate flips to N (on by default) flips all N rotated copies together. Reset weave clears your flips. Flips are saved and undoable. The source layers hide during a woven preview so the weave reads clearly.
Layers top
Every shape and line lives on one layer. The Layers panel controls visibility, locking, opacity, color and nesting.
| In a layer row | What it does |
|---|---|
| Arrow | Opens or closes nested layers. |
| Color dot | Opens the color picker. New lines on the layer take this color. |
| Name | Click into it to rename; Enter keeps, Esc reverts. |
| Select | Selects everything on the layer. |
| Eye | Shows or hides it. Hidden layers are left out of export, tiling, regions and bands. |
| Lock | Locked layers can't be drawn on, cut or dragged. |
| Duplicate · Unmerge · Delete | Copy the layer; put a merged layer's children back at the top level; delete the layer and its contents. |
Click a row to make it the active drawing layer; its color and weight follow. Drag rows to restack them (lower in the list draws on top). The opacity slider sets the active layer's opacity; nested opacities multiply, and SVG export keeps them.
With a layer selected, a row of actions appears: Move and Duplicate for one layer; Merge (flatten into one) and Nest (group under a new parent, keeping each child) for several; Merge Visible whenever two or more are visible. Shift+click rows to select several. The Construction layer is always first and can't be deleted.
Copy and paste layers
Cmd+C copies the selected layer, or every Shift-selected layer, or the active layer when none is selected. Sub-layers, cuts and snap points come along. Cmd+V pastes in place, so tiled work stays in register; Shift+Cmd+V centers the paste on the cursor, snapping to a nearby point. It goes through the system clipboard, so it works between Zillij tabs and windows. Pasted back into the same tab, the copy gets " copy" on its name and a new color, like Duplicate; in another tab it keeps its names and colors. Each paste is one undo step.
Reference image top
For tracing a photo or plan. It is not saved in .zillij files.
- Load Reference Image picks the file; ✕ removes it; Opacity runs 5 to 100% (default 50).
- Visible and Editable switches; lock it once it's in place.
- Drag the center handle to move it and a corner to scale and turn it. Arrow keys nudge it while it's selected and unlocked.
Templates top
Load template… under Save / Load opens a picker of 74 polygons: the regular polygons from triangle to 18-gon, and every shape from PolyTiler's polygonal systems (the 4/8, 5/10, 6/12, 7/14 and 9/18 families: rhombi, kites, trapezoids, irregular pentagons and hexagons, 14-gons and more).
- Click a shape. It is added as a new layer, centered on the origin.
- Every template has the same 200-unit edge, so shapes from any system keep their true proportions and fit together, the way they do in PolyTiler. A decagon, a square and a triangle come in ready to tile: drag them edge to edge; corners snap.
- Each side is its own line, so you can cut, extend, band or color it like anything else.
The same shapes are in the templates folder next to Zillij, one .zillij file each. They are also the easiest way to draw a motif for PolyTiler's Tile motifs: draw inside the template, save, and load it into the matching shape there.
Tiles for PolyTiler top
Design a whole pattern on a small patch of tiles, then let PolyTiler (or Muqarnas Builder) repeat it over a full field. Every template's sides remember that they are tile edges, so Zillij can find each tile again however you move, turn, mirror or copy it.
- Lay out a patch. Add templates with Load template… and snap them edge to edge, one of every shape the tiling uses (an octagon and a square for 4.8.8; a decagon, a pentagon and a rhombus for a 5/10 system). Copy tiles with Cmd-C / Cmd-V or Duplicate; they stay tiles.
- Draw one pattern over it on other layers: lines, circles and arcs, cut as you like. Lines that cross from one tile into the next should meet at the shared edge.
- Export for PolyTiler… (under Save / Load) opens a panel listing each shape it found, with a preview of that shape's motif: the drawing clipped exactly to the tile. The canvas marks every tile edge: green where the lines meet the next tile, red where they don't (a line stops at the edge with nothing on the other side), amber where they meet here but the edge's crossings differ from other edges of the same length, so another tiling that pairs them differently may not line up. It rechecks after every change while it is open.
- When two tiles of the same shape carry different drawings, the panel says so and the first one is used.
- Save motif set writes a .zillij of the patch with the motifs inside. It opens in Zillij like any file.
- In PolyTiler, choose a tiling with those shapes, open Tile motifs and press Load motif set…. Every shape's motif goes into all its tiles, placed corner to corner, exactly as drawn. Any .zillij saved with template tiles works too, without the export step.
The tiles themselves are left out of the motifs (they are the tiling), and so are lines drawn exactly along a tile edge. Twenty worked examples, from 4.8.8 to 7/14 and 9/18 systems, are in work/motif-samples.
Save, load and export top
A .zillij file keeps everything: shapes, lines with their color and weight, cuts, the full layer tree, Add Points and your tessellation settings.
- Save opens a Save As dialog in Chrome and Edge, so you choose the name and folder; other browsers download the file. The button flashes Saved. Every saved file carries a small picture of the whole drawing, which the Open browser shows.
- Load opens a browser of your designs. Choose folder… shows every .zillij file in a folder, and in the folders inside it, as thumbnails, newest first; type in the box to filter by name, click one to open it. Files saved before thumbnails existed get a picture drawn from their lines (kept in this browser, so the next look is quick). In Chrome and Edge the folder is remembered: Show “…” again brings it back next time, after one click to allow it. Choose files… picks files the usual way and takes one or several. One file onto a canvas with something on it asks whether to Add to Scene (as a new layer, keeping its own layers underneath) or Replace Canvas. Several files always add.
- Autosave keeps each tab's design in this browser a few seconds after every change; the line under Save / Load shows the last time. Every tab saves on its own, so several open designs never overwrite each other. Recover… lists designs from tabs that were closed, reloaded or crashed, with a thumbnail and time, plus a few earlier checkpoints of each. Restore brings one into an empty canvas (or opens it in a new tab if this one has work). Autosaves older than two weeks are cleared. They live only in this browser: a .zillij file is still the real save.
- Clear All wipes the canvas after asking. New Document does the same and resets the symmetry center, asking only if there's unsaved work.
- Export SVG asks for the width, height and margin in inches and shows the scale. Only visible, uncut geometry goes out, and the page fits it. Each layer becomes a named group for Rhino, Illustrator or Inkscape, with opacity, color and weight kept.
Your work stays in your browser; nothing is uploaded when you save or export.
Clean Up top
A folded section in the right panel. It runs every checked tidy-up in one pass and reports what it did. Use it on a finished design: it changes geometry in place.
| Option | What it does |
|---|---|
| Duplicate lines | Removes lines with identical ends. |
| Short lines | Removes lines shorter than a minimum (default 2). |
| Isolated connectors | Removes lines that touch nothing. |
| Simplify regions | Thins out region corners (tolerance, default 1.0). |
| Merge collinear | Joins overlapping or touching pieces of the same straight line (gap, default 2). |
| Orphaned snap pts | Removes Add Points markers no longer on a circle. |
Keyboard shortcuts top
| Key | Action |
|---|---|
| A S C X T B | Add Shapes, Select, Connect, Cut, Tile, Finish |
| F | Fit the view |
| ] | Fold or unfold the right panel |
| Esc | Step back in the current tool, or deselect |
| Cmd+Z | Undo (Ctrl+Z on Windows) |
| Shift+Cmd+Z or Ctrl+Y | Redo |
| Cmd+A | Select everything |
| Cmd+C | Copy the selected layers (or the active one) with their sub-layers and cuts |
| Cmd+V / Shift+Cmd+V | Paste layers in place / centered on the cursor, in this or another Zillij tab |
| Delete | Delete the selection |
| Arrow keys | Nudge the selected layer or reference image (Shift: 10 times) |
| 3 to 9, 0, = | Polygon sides (Polygon tab); E toggles Attach to edge |
| Alt+click | Cut Lines: send a segment's length to Radius. Connect: select a line. |
| Shift+click | Add to the selection; on an arc's end, take the long way round |
| Alt+drag, middle-drag | Pan |
| Scroll | Zoom toward the cursor |
| Right-click | Deselect and cancel |
| Enter / Esc | In a dialog: the highlighted button / cancel |
PolyTiler and friends top
PolyTiler grows a whole pattern from a tiling: choose a tiling and an angle and it draws the stars and rosettes for you, then saves a .zillij file to finish here. Its manual covers it panel by panel. Zillij's templates and PolyTiler's tile motifs work as a pair: draw a motif inside a template, and PolyTiler repeats it in every tile of that shape.
Zillij · Islamic Geometry Studio · v353 · Built for muqarnas glass-casting mold design.