The first argument represents a vector of how the positions should be shifted, and the second argument lists the positions that should be shifted.
type |
:: "function-application"
|
|
function_name |
:: "offset-points"
|
|
arguments | :: {NoiseArrayConstruction, NoiseArrayConstruction} |
|
arguments | :: {NoiseArrayConstruction, NoiseArrayConstruction} |
|
function_name |
:: "offset-points"
|
|
type |
:: "function-application"
|
|
-- Shifts "positions" by {100, 90}
local noise = require("noise")
local positions = noise.make_point_list({{-10, -40}, {-50, -20}})
local offset = noise.make_array({100, 90})
local offset_positions =
{
type = "function-application",
function_name = "offset-points",
arguments = {offset, positions}
}
-- or with the noise lib
local also_offset_positions = noise.function_application("offset-points", {offset, positions})