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
grid({ width: 40, height: 30 })Rectangles in rows and columns.runningBond({ width: 45, height: 22, offset: 0.5 })Brick courses, each shifted by offset of a brick.flemishBond({ length: 40, header: 20, height: 18 })Long stretchers and short headers alternating along each course.herringbone({ length: 60, width: 20 })Boards laid in a zigzag; the two directions are protoTiles 0 and 1.chevron({ length: 60, width: 20, angle: 45 })Parallelograms meeting at a point, like a parquet floor.basketweave({ length: 50, strips: 2 })Squares of strips parallel bricks, alternating direction.hopscotch({ large: 45, small: 22 })Two sizes of square, pinwheeling round each other.pinwheel({ length: 50, width: 22 })Four bricks round a small square.Regular polygons
hexagonal({ size: 26, orientation: "pointy" })Honeycomb; orientation is "pointy" or "flat".triangular({ size: 40 })Equilateral triangles, alternately up and down.rhombille({ size: 24 })Tumbling blocks: three rhombs per hexagon, one per face (protoTiles 0–2).octagonSquare({ size: 20 })Octagons with small squares between them.trihexagonal({ size: 22 })Hexagons and triangles: the kagome pattern.rhombitrihexagonal({ size: 16 })Hexagons, squares and triangles.cairo({ size: 40 })Pentagons, as paved on the streets of Cairo.Curved and interlocking
fishScale({ size: 36 })Overlapping arcs. Tiles are non-convex.jigsaw({ size: 34, seed: 1 })Puzzle pieces; seed picks each tab's direction.Aperiodic
penrose({ size: 24, variant: "rhombs" })Thick and thin rhombs that never repeat. origin places the star.penrose({ size: 30, variant: "kitesAndDarts" })The other Penrose set.hat({ size: 26 })The 2023 monotile: one shape, never repeating. Mirrored hats are protoTile 4.spectre({ size: 28 })A monotile that needs no mirrored copies.Escher-style
isohedral({ ih: 41, size: 50, amount: 0.15 })One of the 81 isohedral types, with wavy edges.isohedral({ ih: 28, size: 50, amount: 0.2 })Every tile the same shape, in two orientations.isohedral({ ih: 7, size: 46, amount: 0.18 })Three orientations round each point.Random
voronoi({ size: 34, relax: 2, seed: 1 })Irregular polygons, like crazy paving. relax evens them out.delaunay({ size: 40, relax: 2, seed: 1 })Random triangles.ashlar({ height: 22, minLength: 20, maxLength: 70, heightVariation: 0.3, seed: 1 })Stone courses of random lengths and heights.mondrian({ minSize: 30, maxSize: 90, splitChance: 0.4, snap: 5, seed: 3 })Random rectangles, split and split again.Flow
flow({ size: 8, centers: [{ x: 160, y: 70 }], followEdges: true })Rows of tesserae following the edges and ringing a center point.Settings for each pattern
| Pattern | Settings |
|---|---|
grid | width, height (defaults to width) |
runningBond | width, height, offset (0–1 of a brick; default 0.5) |
flemishBond | length (stretcher), header, height |
herringbone | length, width |
chevron | length, width, angle (degrees) |
basketweave | length (square side), strips (bricks per square) |
hopscotch | large, small (square sides) |
pinwheel | length, width |
hexagonal | size (center to corner), orientation ("pointy" or "flat") |
triangular, rhombille, octagonSquare, trihexagonal, rhombitrihexagonal, cairo, fishScale | size |
jigsaw | size, seed |
penrose | size, variant ("rhombs" or "kitesAndDarts"); set origin to place the star |
hat, spectre | size (the tile's width); origin is the pattern's fixed center |
isohedral | ih (one of isohedralTypes), size, params, edges, amount |
voronoi, delaunay | size, relax (evenness), seed |
ashlar | height, minLength, maxLength, heightVariation, seed |
mondrian | minSize, maxSize, splitChance, snap, seed |
flow | size, length, jitter, guides, centers, followEdges, seed (see Andamento flow) |
periodic, tiles | Your 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.