Skip to content
Shapemetry

Model - Random functions

Every function callable as Random.* inside an expression — an argument input, a parameter binding, a table cell. Pure: no side effects, no async.

FunctionReturnsDescriptionArgTypeMeaning
Random.integer(seed, index, min, max)numberDeterministic INCLUSIVE integer draw [min,max] for (seed, index).seednumberRNG seed
indexnumberdraw index
minnumberrange low, inclusive
maxnumberrange high, inclusive
Random.normal(seed, index, mean, std)numberDeterministic Gaussian draw (Box-Muller) for (seed, index).seednumberRNG seed
indexnumberdraw index
meannumberdistribution mean, default 0
stdnumberstandard deviation, default 1
Random.pointsInLoops(boundary, count, seed)point[]Rejection-samples count points inside closed planar loops, in their own plane. Deterministic order; may return fewer than count for a very thin shape.boundarycurveEntity | curveEntity[] | faceEntity | point[]closed face / curves / rings to sample inside
countnumberhow many points to place
seednumberRNG seed
Random.uniform(seed, index, min, max)numberDeterministic draw in [min,max) for (seed, index).seednumberRNG seed
indexnumberdraw index
minnumberrange low
maxnumberrange high
Random.value(seed, index)numberDeterministic draw in [0,1) for (seed, index). No Math.random anywhere in this engine.seednumberRNG seed
indexnumberdraw index — same (seed,index) always gives the same value
Last updated: 📖 1 min readEdit on GitHub