Skip to main content

vScriptValGridConnect

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

BeginnerMograph / ScriptValScriptValArrayJSON
vScriptValGridConnect node

vScriptValGridConnect has no point input. From Number X and Number Y it outputs edge lists as point numbers, ready for the Edge input of vScriptValShapeRender. 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​

vScriptValPointsOnGrid.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
vScriptValGridConnect.Output -> vScriptValShapeRender.ArrayEdge
Background.Output -> vScriptValShapeRender.Input