cellFill

A 0–1 fill for each cell: 0 at the cell's point, 1 at its boundary, whatever the cell size.

cellFill(cells: Field, slots: {edgeIntensity: PropRef}): Field

Import noise from shaders/std and use noise.cellFill.

edgeIntensity (0 to 1) is how far the boundary color reaches into the cell. Takes the (d1, d2) field from cellDistances. Ramp it directly: the first color lands at the cell centres.

Parameters

NameTypeNotes
cellsField
slots{edgeIntensity: PropRef}

Example

paint: rampOver(cellFill(cells, {edgeIntensity: p('edgeIntensity')}), stops(p('colorSpace')))

See also

  • cellDistances — Distances from each pixel to its nearest two cell points, as (d1, d2): the raw material for Voronoi fills and borders.
  • cellBorders — A mask of the lines between cells: 0 on a boundary, 1 inside a cell.

Used by

Voronoi