vJSONMinMax
Generate an array of random values where each value in an entry has its own minimum and maximum.

vJSONMinMax has no input and outputs an array of random entries. Array length sets the number of entries, Pack To sets whether each entry holds X, X Y or X Y Z, and each value has its own range.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Array length | Integer | 1 | Number of entries in the output. Minimum 0, default 1. |
| Pack To: | Dropdown | XY | Options: X, XY, XYZ. |
| Min1 | Float | -1 | Lower limit of the first value in each entry. Default -1. |
| Max1 | Float | 1 | Upper limit of the first value in each entry. Default 1. |
| Min2 | Float | -1 | Lower limit of the second value in each entry. Default -1. |
+5 more parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| Max2 | Float | 1 | Upper limit of the second value in each entry. Default 1. |
| Min3 | Float | -1 | Lower limit of the third value in each entry. Default -1. |
| Max3 | Float | 1 | Upper limit of the third value in each entry. Default 1. |
| Seed | Integer | 0 | Seed of the random generator. Default 0. |
| Show Input | Integer | 0.0 | Shows or hides a connection point on the Array length control. Default off. |
Read the full description
The node seeds Lua's random generator with Seed and writes Array length entries. The first value of each entry is drawn uniformly between Min 1 and Max 1, the second between Min 2 and Max 2 and the third between Min 3 and Max 3. The same Seed gives the same output.
Pack To selects how many of the three ranges are used: X uses range 1, XY uses ranges 1 and 2, and XYZ uses all three. With the defaults (Array length 1, XY, every range -1 to 1) the node outputs one entry with two values. Ranges that are not used are ignored.
Array length can be 0, which gives an empty array. Show Input adds a connection point to the Array length control so that the length can be driven from another node.
Use vJSONRandom when one range is enough for every value.
Example Connections
- Draw random points
- Offset the points before drawing
vJSONMinMax.Output -> vJSONCameraProjection.ArrayA
vJSONCameraProjection.Output -> vJSONShapeRender.ArrayPoint
Background.Output -> vJSONShapeRender.Input
vJSONMinMax.Output -> vJSONTranslate.ArrayA
vJSONTranslate.Output -> vJSONCameraProjection.ArrayA