Scripts allows you to edit any parameter in grid. With this feature any adjustment is possible for group or individual element. It means you can for example hide any element of grid or set angle of rotation individually.
Script excecutes for every instance of grid. You can use col and row indexes [ i , j ] for individual adjustment.
In table below listed all available variables. Note that some of them is read only.
Functions allows you to get values from custom Sliders, Colors and Layers. Also to get Noise and Random parameters.
GetFloat(ind) — returns the Parameters Slider value with the given index ind [1..10]
GetColor(ind) — returns the Parameters Color value with the given index ind [1..10]
GetLayer(ind, xPart, yPart)— returns the Parameters Layer value with the given index ind [1..10] and x and y coords [0..1]
GetNoise(ind, xPart, yPart) — returns the Parameters noise value with the given index ind [1..10] and x and y coords [0..1]. Noise amplitude, scale, offsets and seed can be adjusted from Parameters -> Noises
GetRandom(ind, i, j) — returns the Parameters random value with the given index ind [1..10] and i and j integer values (indexes). Random range and seed can be adjusted from Parameters -> Randoms
Scripts is based on Lua language, so you can use built-in mathematical functions like a math.sin (x) in your scripts.
This sample demonstrate how to turn each element by 90 degrees CV from each other:
angle = (i + j) * 90
This sample demonstrate how to create wave using sine function with amplitude from Slider 1 and offset from Slider 2:
y = y + GetFloat(1)*math.sin(x+GetFloat(2))
This sample demonstrate how to scatter random colors to instances from colors list. Random range and seed can be adjusted from Random 1 parameters:
r,g,b = GetColor(GetRandom(1,i,j));
In this sample Stroke and Fill is randomized. Random seed can be adjusted from Random 1 parameters:
stroke = false
if ( GetRandom(1,i,j) > 50 ) then
stroke = true
end