Skip to main content

vArrayIterator

Keeps every Nth point of an array and skips the points in between.

BeginnerMograph / ArrayArrayScriptValJSON
vArrayIterator node

vArrayIterator takes an array of XYZ points and outputs points 1, 1 + Step, 1 + 2 * Step and so on. Step is the only control, and 1 keeps every point.

Parameters​

ParameterTypeDefaultDescription
Step - (skip x points)Integer1Take every Nth point, so Step - 1 points are skipped between kept ones. Minimum 1, slider 1 to 10, default 1.
InputDATATYPE—Data to process.
Read the full description

The node walks the input from the first element in steps of Step and copies the first three values of each element it lands on. With Step 2 on ten points it keeps points 1, 3, 5, 7 and 9. With Step 3 it keeps points 1, 4, 7 and 10.

Step is an integer from 1, slider 1 to 10, default 1. At 1 every point is copied. Elements that are not lists with at least three values are dropped, so an array of plain numbers gives an empty output.

Nothing is repeated or looped. The output has at most the input length divided by Step, rounded up, because dropped elements shorten it further.

Example Connections​

vArrayPointsOnGrid.Output -> vArrayIterator.ArrayA
vArrayIterator.Output -> vArrayCameraProjection.ArrayA
vArrayCameraProjection.Output -> vArrayShapeRender.ArrayPoint
Background.Output -> vArrayShapeRender.Input