Equilateral Triangle Grid

The points of a grid of equilateral triangles inside an area.

Node id lattice/equilateral-triangle

The Equilateral Triangle Grid node outputs the points of a triangular grid that fall inside area: every point is size away from its six neighbours, so they form equilateral triangles (or, taken in groups, hexagons).

Inputs

NameTypeDefaultNotes
areaBoundingBox—
sizenumber100

Outputs

NameTypeNotes
pointsArray<Point>

Behaviour

  • Origin. The grid starts at the area's top-left corner, which is always one of its points.
  • Rows. Points are size apart along each row (default 100). The rows are size × √3 / 2 apart, about 0.866 × size, and every other row is shifted by half a step.
  • Order. Points come along slanted columns, from left to right. Points on the area's edges are included.

Errors

  • area must be connected.
  • size can't be 0.
  • An area holding more than 100 000 grid positions is an error. Use a larger size or a smaller area.

Example

A triangle grid with size 150 in an 800 × 600 area, drawn as a polyline through its points. The line runs along the grid's slanted columns.

An equilateral triangle grid's points joined by a polyline in their orderOpen in Playground
© 2026 Wirepaint