truchetArcs

A maze of quarter-circle arcs, two per tile, flipped at random so they join into flowing curves.

truchetArcs(slots: {
    frame: PatternPaint
    thickness: PropRef
    softness: PropRef
    seed: PropRef
}): PatternPaint

Import patterns from shaders/std and use patterns.truchetArcs.

Returns the arc mask (1 on an arc). thickness 2 draws arcs about 2% of a tile wide; 0 draws none. softness 0–1 blurs the edges. seed picks a different set of flips. Draw it in a 'clockwise' cellFrame.

Parameters

NameTypeNotes
slots`{
frame: PatternPaint
thickness: PropRef
softness: PropRef
seed: PropRef

}` | |

Example

paint: strokeOver({fill: p('colorA'), stroke: p('colorB'), mask: truchetArcs({frame: cellFrame({cells: p('cells'), rotation: p('rotation'), convention: 'clockwise'}), thickness: p('thickness'), softness: p('softness'), seed: p('seed')}), space: p('colorSpace')})

See also

  • cellFrame — The shared coordinate system of a tiled pattern: how many cells fit down the canvas height and how far the whole lattice is rotated.
  • gridLines — Square grid lines drawn in a cellFrame, plus a per-cell shade for the fill.
  • weaveThreads — Two sets of threads woven over and under each other, returned as a finished color.

Used by

Truchet