Skip to main content

vArrayGridConnect

Builds edge lists for a grid of points as rows, columns, zigzags, diagonals or a border.

BeginnerMograph / ArrayArrayScriptValJSON
vArrayGridConnect node

vArrayGridConnect has no point input. From Number X and Number Y it outputs edge lists as point numbers, ready for the Edge input of vArrayShapeRender. Direction picks the pattern.

Parameters​

ParameterTypeDefaultDescription
Number XInteger1Points per row. Range 1 to 10000, slider 1 to 100, default 1.
Number YInteger1Number of rows. Range 1 to 10000, slider 1 to 100, default 1.
DirectionDropdownHorizontalHorizontal (default), Vertical, Both, Zigzag (Horizontal), Zigzag (Vertical), Diagonal (Both Directions) or Border Only.
Stride (skip N lines)Integer1Keeps every Nth row or column in Horizontal, Vertical and Both. Range 1 to 10000, default 1.
Zigzag: Reverse StartInteger0Flips the starting direction of the zigzag. Default off.
Read the full description

The node assumes a grid of Number X points per row and Number Y rows, numbered row by row from 1, so point (column, row) has the number row * Number X + column + 1. It outputs lists of these numbers.

Horizontal gives one line per row, Vertical one per column, and Both gives both. Stride (default 1) skips lines in those three modes. Zigzag (Horizontal) and Zigzag (Vertical) give one line that alternates direction, and Reverse Start flips the first direction. Diagonal gives lines in both diagonal directions. Border Only gives a closed loop around the grid.

Example Connections​

vArrayPointsOnGrid.Output -> vArrayCameraProjection.ArrayA
vArrayCameraProjection.Output -> vArrayShapeRender.ArrayPoint
vArrayGridConnect.Output -> vArrayShapeRender.ArrayEdge
Background.Output -> vArrayShapeRender.Input