Stained glass and mosaic pattern maker
Turn a photo into a stained-glass pattern whose pieces you can actually cut — a minimum size and width, no deep inside curves or holes — with smooth lead or foil lines, numbered pieces and a colour key, glass area per colour with waste, came and foil lengths, an editor to merge, split, move and recolour pieces, and a real-size cartoon plus a pattern copy drawn at the pattern-shear width; or into a mosaic of square tesserae (grid, brick or following the edges) in your own tile colours, with counts and a printable map.
Added
How to use it
Give it a photo and the size of the panel. It simplifies the picture into pieces of glass, checks every piece can be cut, and draws the cartoon at full size for the bench.
How to use it
Stained glass
-
Drop in a photo (or use the sample picture). Bold shapes and clear colours work best; a busy photo needs more pieces.
-
Panel: the width in millimetres (the height follows the picture), roughly how many pieces, and how many glass colours.
-
Cuttable pieces: the smallest piece (cm²), the narrowest a piece may be (mm), and the solidity limit — a piece’s area over the area of a rubber band stretched round it. A deep inside curve or a hole drops the solidity; such pieces are split in two with a straight line, which is what you’d do with a lead line anyway. Pieces narrower than the width you set are trimmed back to where a disc of that width fits, and the strip goes to the neighbour. Corners sharper than 25° are flagged in orange.
-
Edit: Select a piece to see its size and give it another glass (click its code in the key), Merge two neighbours, Split one by clicking two points across it, or Move junctions by dragging the blue dots. Undo goes back step by step.
-
Colour key: each glass gets a code (G1, G2…); set the colour and write in the glass you’ll use. The table gives the area of each with your waste allowance.
-
Totals: copper foil is the sum of every piece’s perimeter; inside came counts each line between two pieces once; the border came goes round the edge.
-
Print: the cartoon is the copy you keep whole, lines at the came width, pieces numbered and tinted. The pattern is the copy you cut up: its lines are as wide as your pattern shears take out (about 1 mm for foil, 1.6 mm for lead), so each cut-out piece is the size of the glass. Both print at real size, tiled over A4, Letter or A3 with an overlap, trim lines, a page map and a 100 mm check square. SVG is true size; DXF has each piece as a closed outline.
Mosaic
-
The same photo, a panel width, the tile size and the grout gap.
-
Layout: a square grid, offset rows, or rows that follow the edges of the picture (one to four rows along each edge, the rest filled square and the gaps with half tiles — a nod to opus vermiculatum).
-
Your tile colours: a list of names and hex colours — the tiles you can buy. Each tessera takes the nearest of them to the picture under it.
-
The table counts tiles of each colour, with spares and whole sheets; the map prints at real size with each tile’s colour number.
For matching colours to glass or tile samples, the colour converter helps; for lead or foil designs that go on to a laser or CNC, see laser-cut patterns.
How it works
The photo is shrunk to a few hundred pixels and converted to CIELAB. SLIC superpixels are merged (Ward’s criterion, smallest first) down to the piece count; an opening by the minimum width removes slivers and points; pieces with holes or low solidity are split by 2-means on their pixels; then the piece colours are clustered into the glass colours with k-means started deterministically, so the same photo and settings always give the same pattern. The borders between pieces are traced as shared chains between junctions, simplified and smoothed with their ends fixed, so neighbouring pieces have exactly the same edge. Areas and lengths are measured on those smoothed lines.
Feedback is a gift. Something to improve, a feature to add, or a bug? Tell me.
Runs entirely in your browser — network requests go only to the services named on this page.