Skip to content

Patterns ​

Every pattern is a function in @andamento/core that returns a plain spec object, so hexagonal({ size: 26 }) is the same as { type: "hexagonal", size: 26 }. Sizes are in region units. Below, each picture is a 240 × 150 region with the spec shown.

Tiles are colored so neighbors differ, or by protoTile (the kind of tile within the pattern) where the pattern has several, like herringbone's two directions or rhombille's three faces. Color by kind yourself with protoTileFill (see Color, pictures and relief).

Every pattern takes rotation and origin in the layout options, except the random ones (voronoi, delaunay, ashlar, mondrian, jigsaw) and flow. Every pattern can be scaled as a whole with tileScale.

Bricks and boards

Regular polygons

Curved and interlocking

Aperiodic

Escher-style

Random

Flow

Settings for each pattern ​

PatternSettings
gridwidth, height (defaults to width)
runningBondwidth, height, offset (0–1 of a brick; default 0.5)
flemishBondlength (stretcher), header, height
herringbonelength, width
chevronlength, width, angle (degrees)
basketweavelength (square side), strips (bricks per square)
hopscotchlarge, small (square sides)
pinwheellength, width
hexagonalsize (center to corner), orientation ("pointy" or "flat")
triangular, rhombille, octagonSquare, trihexagonal, rhombitrihexagonal, cairo, fishScalesize
jigsawsize, seed
penrosesize, variant ("rhombs" or "kitesAndDarts"); set origin to place the star
hat, spectresize (the tile's width); origin is the pattern's fixed center
isohedralih (one of isohedralTypes), size, params, edges, amount
voronoi, delaunaysize, relax (evenness), seed
ashlarheight, minLength, maxLength, heightVariation, seed
mondrianminSize, maxSize, splitChance, snap, seed
flowsize, length, jitter, guides, centers, followEdges, seed (see Andamento flow)
periodic, tilesYour own tiles (see Your own tilings)

Escher-style tilings ​

isohedral({ ih, size, params?, edges?, amount? }) makes any of the 81 isohedral tiling types, the family Escher drew his tessellations from. Every tile has the same shape, and the shape's edges can be bent freely:

  • edges: "wave" (default) or "straight", or your own curves, one per edge class.
  • amount: how far wave edges bend.
  • params: the type's shape parameters.

isohedralInfo(ih) lists a type's parameters and which edges must be S-shaped (180° symmetric), U-shaped (mirror symmetric) or straight. isohedralTypes lists the types. The tile's orientation class is its protoTile.

Aperiodic tilings ​

penrose, hat and spectre never repeat. They grow from a fixed center, origin, which defaults to the region's top left. Set it to the region's middle for a symmetrical picture: Penrose then has its ten-fold star in the middle. About one hat in seven is a mirror image, with protoTile 4; the spectre needs no mirrored tiles.

Hat tiling and isohedral tilings after Craig S. Kaplan's hatviz and Tactile (BSD 3-Clause).