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

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.

  1. 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.
  2. 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.
  3. Connect Points. Switch to a new layer and draw lines between crossings. Turn on Symmetry to draw every rotated copy at once.
  4. Tile. In Tile mode, Radial repeats a sector all the way round; Tessellate repeats a tile across a grid.
  5. Cut Lines. Click segments to hide them. Cuts survive undo, redo and saving.
  6. Finish. Close small gaps, find closed regions to color, or make bands (mitered, woven, outline, overlap). Export SVG.
AddShapes LockConstruction ConnectPoints TileRadial, Tessellate CutLines FinishRegions and bands
The six stages, left to right.
TipStart simple: one circle and one hexagon at radius 100 give enough crossings to draw a classic six-pointed star in a couple of minutes.

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 controlWhat it does
Undo / RedoStep back or forward (Cmd+Z, Shift+Cmd+Z or Ctrl+Y).
FitZoom to fit what you can see (F). Hidden layers and cut-away construction are ignored, so the fit hugs your actual design.
Pick CenterClick 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 OriginPuts the symmetry center back at (0, 0).
Grid · Isect · FillShow the background grid (on), intersection dots (off) and shape fills (off).
SnapOpens the snap settings (see Snapping).
Dark / LightSwitches theme. Light mode uses a white canvas, dark construction ink and a darker set of layer colors. Remembered between visits.
? HelpOpens this reference.
CoordinatesThe cursor's position on the canvas.
+ New DocumentA blank canvas with the symmetry center reset. Asks first only if there is unsaved work.

Navigation

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.

Intersectiongold Centerblue Originteal Gridgreen Midpointorange
Snap ring colors.
Snap toggleDefaultSnaps to
OriginOnThe origin (0, 0).
IntersectionsOnEvery crossing of shapes and lines, except where every line through it is cut.
Shape CentersOnShape centers, plus the midpoints of lines and polygon sides.
GridOffGrid 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.

placed here5 copies added
Propagate to N = 6: one click, six circles.

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.

ActionResult
Click a shapeSelects it.
Drag on empty canvasSelects everything inside the rectangle.
Shift+clickAdds to or removes from the selection.
Double-click a shapeSelects its whole layer.
DeleteDeletes the selection.
Right-click or EscDeselects and cancels whatever is in progress.

Moving

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.

TipTo build a mirrored quadrant: turn on Make new layer, flip, then merge the two layers. Cut Lines' Include mirror reflections then cuts matching pieces on both halves at once.

Connect Points C top

Draw the pattern lines between snap points. These are the visible design, separate from construction.

Sub-modeHow it works
DrawClick a start point, then an end point. Click empty canvas to cancel a line in progress.
Align and TrimClick 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 LineClick 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.

P1P2endend
Click P1 and P2; the line runs on to the outermost crossing each way.

Symmetry, Extend and line style

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.

  1. Click P1, the start of the reference direction.
  2. Click P2, where the new line starts.
  3. 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.

Tip90° with Through-line gives a clean perpendicular bisector. 60° on a hexagonal grid hits all the natural rosette crossings.

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.

  1. Hover a segment: it glows red and its length shows in the banner.
  2. Click to cut it.
  3. Click the ghost to bring it back.

Symmetric cut

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.

Before you applyBoth tabs copy geometry across the canvas. Save a .zillij file first if you might want the single tile back later.

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.

GridLayout
SquareRows and columns; set Step X and Y to your tile's size.
HexA hexagonal lattice with offset rows; Auto-detect reads a six-sided outline.
RhombusA slanted lattice; Angle (10 to 80°) sets the slant, and Diamond sets 45°.
TriangleAn equilateral triangle grid; every other row is turned 180°.

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.

  1. Choose the grid type and click Set Tile Alignment Points. A 2 × 2 preview opens.
  2. Click 1: on the bright tile, click a landmark such as a star tip or a meeting point.
  3. Click 2: the neighbor comes forward. Click the point on it that should meet your first point.
  4. 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.

Watch outThe second click is the point that should meet the first, not the same feature on the other tile. The same landmark twice describes a step of zero.

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

  1. 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.
  2. Find Closed Regions finds every enclosed face and fills it with color.
  3. Regroup sorts regions by side count and size (tune Max groups and Max sides), so matching tiles share a color.
  4. 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.

Regions need closed shapesA line end that touches nothing makes a large stray face. Run Close gaps and check the open-end count first. Region edges around circles are made of short straight pieces, fine for fills and SVG but not perfectly smooth.

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.

StyleResult
MiteredFull-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.
WovenRibbons 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.
OutlineJust the outline of the band network: a clean double line, open at every crossing, with short loose ends removed.
OverlapOutlines plus a center line, all running straight through every crossing, so the strands look stacked.
TipCreated bands are ordinary lines. If a junction isn't right, trim it in Cut Lines rather than fighting the weave preview.

Layers top

Every shape and line lives on one layer. The Layers panel controls visibility, locking, opacity, color and nesting.

In a layer rowWhat it does
ArrowOpens or closes nested layers.
Color dotOpens the color picker. New lines on the layer take this color.
NameClick into it to rename; Enter keeps, Esc reverts.
SelectSelects everything on the layer.
EyeShows or hides it. Hidden layers are left out of export, tiling, regions and bands.
LockLocked layers can't be drawn on, cut or dragged.
Duplicate · Unmerge · DeleteCopy 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.

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).

  1. Click a shape. It is added as a new layer, centered on the origin.
  2. 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.
  3. 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.

  1. 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.
  2. 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.
  3. 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.
  4. When two tiles of the same shape carry different drawings, the panel says so and the first one is used.
  5. Save motif set writes a .zillij of the patch with the motifs inside. It opens in Zillij like any file.
  6. 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.

Your work stays in your browser; nothing is uploaded when you save or export.

TipSave before any big operation (Radial or Tessellate Apply, Clear All). Files are small and load instantly.

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.

OptionWhat it does
Duplicate linesRemoves lines with identical ends.
Short linesRemoves lines shorter than a minimum (default 2).
Isolated connectorsRemoves lines that touch nothing.
Simplify regionsThins out region corners (tolerance, default 1.0).
Merge collinearJoins overlapping or touching pieces of the same straight line (gap, default 2).
Orphaned snap ptsRemoves Add Points markers no longer on a circle.

Keyboard shortcuts top

KeyAction
A S C X T BAdd Shapes, Select, Connect, Cut, Tile, Finish
FFit the view
]Fold or unfold the right panel
EscStep back in the current tool, or deselect
Cmd+ZUndo (Ctrl+Z on Windows)
Shift+Cmd+Z or Ctrl+YRedo
Cmd+ASelect everything
Cmd+CCopy the selected layers (or the active one) with their sub-layers and cuts
Cmd+V / Shift+Cmd+VPaste layers in place / centered on the cursor, in this or another Zillij tab
DeleteDelete the selection
Arrow keysNudge the selected layer or reference image (Shift: 10 times)
3 to 9, 0, =Polygon sides (Polygon tab); E toggles Attach to edge
Alt+clickCut Lines: send a segment's length to Radius. Connect: select a line.
Shift+clickAdd to the selection; on an arc's end, take the long way round
Alt+drag, middle-dragPan
ScrollZoom toward the cursor
Right-clickDeselect and cancel
Enter / EscIn a dialog: the highlighted button / cancel
Shortcut not working?Single-letter keys are ignored while a text or number field has focus (Radius, a Clean Up value, a layer name). Click an empty spot on the canvas and try again.

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.