node grid - blossommerz/locus-hub GitHub Wiki
Home > Primitives > Rectangular Grid
< Previous: Regular Polygon: Center | Next: Oblique Grid >
A parametric rectangular lattice of points.
Category: Primitives | Add menu: Primitives > Rectangular Grid
Four numbers - two counts and two spacings - define a rectangular lattice. Each is an input port: it shows an editable value when nothing is wired, or it can be driven by a Slider so the grid resizes live. It has two outputs: Points, the bare lattice (feed it into a Circle: Center Radius as centers, into a rectangle's corners, or on to Realize), and Segments, the same lattice drawn with its row and column lines.
- Count X (number): how many columns.
- Count Y (number): how many rows.
- Spacing X (number): horizontal gap between points, in mm.
- Spacing Y (number): vertical gap between points, in mm.
- Lattice V1 (any): optional. Aims and anchors the lattice, see below.
- Lattice V2 (any): optional. Read for its length only, never its direction.
- Spacing Override (boolean): take each step from its own vector's length instead of the Spacing numbers. Off by default.
- Segments (curve): the row and column lines through the lattice.
- Points (point): the bare lattice of points.
Wire a vector into Lattice V1 and the lattice moves onto it: the first point lands on the vector's start and the first axis runs along the vector, so the whole grid follows the vector as you drag it. Unwired, the lattice stays axis-aligned on the origin, which is the behavior it has always had.
Lattice V2 is different here. Grid reads it for its length and ignores its direction, because the second axis always stays on V1's left perpendicular. That is deliberate: a Rectangular Grid cell stays a rectangle. To shear the cell into a parallelogram, use Oblique Grid, which reads V2's direction too.
Either vector input reads a segment (a to b), a ray (direction only), or two points (first to second), the same convention Array: Directed uses.
With Spacing Override on, the horizontal step comes from V1's length and the vertical step from V2's length. A vector with no usable length, a ray for instance, leaves its own Spacing number standing.
Note
Counts are rounded to whole numbers and floored at 1, and the total is capped at 250,000 sites, so a runaway slider cannot lock the app up.
< Previous: Regular Polygon: Center | Next: Oblique Grid >
- Oblique Grid: two arbitrary directions, for parallelogram, rhombic and hexagonal cells.
- Triangular Grid: equilateral cells from a single spacing.

