Skip to main content

7  Banner: motifs, blending and layout

The concrete target is a long banner that contains the main Sjónabók motifs and moves smoothly from one to the next, in the spirit of a refilsaumur hanging. This splits into three problems.

7.1 1. Motif extraction and clustering

  • Cut motifs. Start from the _pN splits (Chapter 1), then curate. Connected components with a dilation radius are the simplest automatic cut; the alphabet pages already have a label map.
  • Canonicalise. Detect each motif’s symmetry and reduce it to a fundamental region plus group (Chapter 4), so mirrored or rotated copies collapse together.
  • Describe and cluster. Simple descriptors (size, fill ratio, symmetry group, \(k \times k\) pattern histograms as in WFC (Gumin 2016; Lucas and Volz 2019)) clustered with k-medoids or hierarchical clustering in R, to pick “the main motifs” and to define a similarity graph for ordering them. The final list of main motifs should be Helga’s choice, assisted by the clusters.

7.2 2. Blending between fixed motifs

Pin each chosen motif at its position and synthesise the gaps. Candidate fillers, all of which accept fixed cells:

  • Constrained WFC. Pre-collapse the motif cells, run the overlapping model on the rest (Gumin 2016; Karth and Smith 2022). Patterns extracted from both neighbouring motifs (or their sources) give a transition that borrows from each side. Weighting the catalogue by distance to each motif makes the style drift across the gap.
  • Quilting seams. Overlap the neighbouring motifs’ extended texture and cut along a minimum-error seam (Efros and Freeman 2001; Kwatra et al. 2003).
  • Exemplar inpainting. Treat the gap as a hole (Criminisi et al. 2004); later, a diffusion inpainter (Lugmayr et al. 2022) if a model ever exists.
  • Latent interpolation. Decode points between two motifs’ latent codes (Kingma and Welling 2014). Smooth, but needs a model and data.

7.3 3. Layout

  • Long aspect ratio. The banner is a frieze. Choosing a frieze group for the background band(s) fixes rhythm and symmetry cheaply (Grünbaum and Shephard 1987).
  • Horizontal tiling. If the banner should repeat seamlessly (or wrap around a garment), use a periodic boundary in the synthesis step.
  • Machine width. Width in needles and length in rows are bounded by the machine and by the jacquard pattern memory or the download path used (see TODO.md).
  • Composition. A simple sequence (motif, transition, motif, …) on a centre line with border bands top and bottom matches many historical pieces; a grammar can generalise this later.