Package-level declarations

Types

Link copied to clipboard
object Distribute
Link copied to clipboard
typealias IDDD_D = (Int, Double, Double, Double) -> Double
Link copied to clipboard
object Random

Deterministic Random using a seed to guarantee the same random values between iterations

Properties

Link copied to clipboard
val Cell2D: Array<Vector2>

Represents a 2D array of pre-defined normalized Vector2 values often used in algorithms requiring pseudo-random or structured deterministic value sets.

Link copied to clipboard
val Cell3D: Array<Vector3>

Cell3D represents a predefined 3-dimensional grid or lattice of points in space, where each point is represented as a Vector3 object containing three coordinates (x, y, z). These coordinates are used for various computational purposes such as procedural generation, cell-based simulations, or spatial analysis.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline fun billow(seed: Int, x: Double, crossinline noise: (Int, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a Billow noise value, which is a type of fractal noise that emphasizes the absolute value of noise layers.

inline fun billow(seed: Int, position: Vector2, crossinline noise: (Int, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double
inline fun billow(seed: Int, x: Double, y: Double, crossinline noise: (Int, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a 2D Billow noise value, which is a type of fractal noise that emphasizes the absolute value of noise layers.

inline fun billow(seed: Int, position: Vector3, crossinline noise: (Int, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a 3D Billow noise value, which is a type of fractal noise that emphasizes the absolute value of noise layers.

inline fun billow(seed: Int, position: Vector4, crossinline noise: (Int, Double, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a 4D Billow noise value, which is a type of fractal noise that emphasizes the absolute value of noise layers.

inline fun billow(seed: Int, x: Double, y: Double, z: Double, crossinline noise: (Int, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a fractal noise pattern using the Billow algorithm.

inline fun billow(seed: Int, x: Double, y: Double, z: Double, w: Double, crossinline noise: (Int, Double, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a 4D billow noise value, which is a type of fractal noise that emphasizes the absolute value of noise layers.

Link copied to clipboard
fun (Int, Double) -> Double.billow(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double) -> Double
fun (Int, Double, Double) -> Double.billow(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double) -> Double
fun (Int, Double, Double, Double) -> Double.billow(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double, Double) -> Double
fun (Int, Double, Double, Double, Double) -> Double.billow(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double, Double, Double) -> Double
Link copied to clipboard
fun (Int, Double) -> Double.bipolar(sampleCount: Int = 1000, percentile: Double = 1.0, random: Random = Random(0)): (Int, Double) -> Double
fun (Int, Double, Double) -> Double.bipolar(sampleCount: Int = 1000, percentile: Double = 1.0, random: Random = Random(0)): (Int, Double, Double) -> Double
fun (Int, Double, Double, Double) -> Double.bipolar(sampleCount: Int = 1000, percentile: Double = 1.0, random: Random = Random(0)): (Int, Double, Double, Double) -> Double
Link copied to clipboard
fun (seed: Int, t: Double) -> Double.clamp(min: Double, max: Double): (Int, Double) -> Double
fun (seed: Int, x: Double, t: Double) -> Double.clamp(min: Double, max: Double): (Int, Double, Double) -> Double
fun (seed: Int, x: Double, y: Double, t: Double) -> Double.clamp(min: Double, max: Double): (Int, Double, Double, Double) -> Double
Link copied to clipboard
fun (Int, Double) -> Double.crossFade(start: Double, end: Double, width: Double = 0.5): (Int, Double) -> Double
fun (Int, Double, Double) -> Double.crossFade(start: Double, end: Double, width: Double = 0.5): (Int, Double, Double) -> Double
fun (Int, Double, Double, Double) -> Double.crossFade(start: Double, end: Double, width: Double = 0.5): (Int, Double, Double, Double) -> Double
Link copied to clipboard
fun cubic(seed: Int, position: Vector2): Double
fun cubic(seed: Int, position: Vector3): Double
fun cubic(seed: Int, x: Double, y: Double): Double
fun cubic(seed: Int, x: Double, interpolator: (Double) -> Double = ::linear): Double
fun cubic(seed: Int, x: Double, y: Double, z: Double): Double
fun cubic(seed: Int, x: Double, y: Double, interpolator: (Double) -> Double = ::linear): Double
fun cubic(seed: Int, x: Double, y: Double, z: Double, interpolator: (Double) -> Double): Double

fun cubic(a: Double, b: Double, c: Double, d: Double, t: Double): Double

Computes the value of a cubic interpolation given control points and a parameter t.

Link copied to clipboard
fun cubicHermite(seed: Int, x: Double): Double
fun cubicHermite(seed: Int, position: Vector2): Double
fun cubicHermite(seed: Int, position: Vector3): Double
fun cubicHermite(seed: Int, x: Double, y: Double): Double
fun cubicHermite(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
fun cubicLinear(seed: Int, x: Double): Double
fun cubicLinear(seed: Int, position: Vector2): Double
fun cubicLinear(seed: Int, position: Vector3): Double
fun cubicLinear(seed: Int, x: Double, y: Double): Double
fun cubicLinear(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
fun cubicQuintic(seed: Int, x: Double): Double
fun cubicQuintic(seed: Int, position: Vector2): Double
fun cubicQuintic(seed: Int, position: Vector3): Double
fun cubicQuintic(seed: Int, x: Double, y: Double): Double
fun cubicQuintic(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
Link copied to clipboard
inline fun fbm(seed: Int, x: Double, crossinline noise: (Int, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Computes the fractional Brownian motion (FBM) value for a given input using a specified noise function.

inline fun fbm(seed: Int, position: Vector2, crossinline noise: (Int, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Computes a fractal Brownian motion (FBM) value for a given 2D position using the provided noise function.

inline fun fbm(seed: Int, position: Vector3, crossinline noise: (Int, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Computes fractal Brownian motion (fBm) at a specific 3D position using a given noise function.

inline fun fbm(seed: Int, position: Vector4, crossinline noise: (Int, Double, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a fractal Brownian motion (fbm) value based on the provided noise function.

inline fun fbm(seed: Int, x: Double, y: Double, crossinline noise: (Int, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates fractional Brownian motion (fBm) using a base noise function. fBm is a technique to produce fractal-like procedural textures or terrains.

inline fun fbm(seed: Int, x: Double, y: Double, z: Double, crossinline noise: (Int, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Computes fractional Brownian motion (fBm) for a given seed, coordinates, and noise function.

inline fun fbm(seed: Int, x: Double, y: Double, z: Double, w: Double, crossinline noise: (Int, Double, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Computes fractal Brownian motion (fBm) using the given noise function.

Link copied to clipboard
fun (Int, Double) -> Double.fbm(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double) -> Double
fun (Int, Double, Double) -> Double.fbm(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double) -> Double
fun (Int, Double, Double, Double) -> Double.fbm(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double, Double) -> Double
fun (Int, Double, Double, Double, Double) -> Double.fbm(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double, Double, Double) -> Double
Link copied to clipboard
fun fhash1D(seed: Int, x: Int): Double
Link copied to clipboard
fun fhash2D(seed: Int, x: Int, y: Int): Double
Link copied to clipboard
fun fhash3D(seed: Int, x: Int, y: Int, z: Int): Double
Link copied to clipboard
fun fhash4D(seed: Int, x: Int, y: Int, z: Int, w: Int): Double
Link copied to clipboard
fun (Int, Double, Double) -> Double.fixedRadiusPolar(radius: Double, origin: Vector2 = Vector2.ZERO): (Int, Double) -> Double
Link copied to clipboard
fun fixedRadiusPolarFunc(noise: (Int, Double, Double) -> Double, radius: Double, origin: Vector2 = Vector2.ZERO): (seed: Int, angleInDegrees: Double) -> Double

Polar coordinate front-end for 2D noise functions

Link copied to clipboard
fun fshash1D(seed: Int, x: Int): Double
Link copied to clipboard
fun fshash2D(seed: Int, x: Int, y: Int): Double
Link copied to clipboard
fun fshash3D(seed: Int, x: Int, y: Int, z: Int): Double
Link copied to clipboard
fun fshash4D(seed: Int, x: Int, y: Int, z: Int, w: Int): Double
Link copied to clipboard
fun gaussian(mean: Double = 0.0, deviation: Double = 1.0, random: Random = Random.Default): Double

Generates a random number following a Gaussian (normal) distribution.

Link copied to clipboard
fun Double.Companion.gaussian(mean: Double = 0.0, deviation: Double = 1.0, random: Random = Random.Default): Double

Generates a random number following a Gaussian (normal) distribution.

fun Vector2.Companion.gaussian(mean: Vector2 = Vector2.ZERO, deviation: Vector2 = Vector2.ONE, random: Random = Random.Default): Vector2

Generates a random 2D vector with components sampled from independent Gaussian (normal) distributions.

fun Vector3.Companion.gaussian(mean: Vector3 = Vector3.ZERO, deviation: Vector3 = Vector3.ONE, random: Random = Random.Default): Vector3

Generates a random Vector3 following a Gaussian (normal) distribution.

fun Vector4.Companion.gaussian(mean: Vector4 = Vector4.ZERO, deviation: Vector4 = Vector4.ONE, random: Random = Random.Default): Vector4

Generates a random Vector4 where each component is sampled independently from a Gaussian (normal) distribution.

Link copied to clipboard
fun gradCoord2D(seed: Int, x: Int, y: Int, xd: Double, yd: Double): Double

Computes the dot product of a gradient vector and a distance vector in 2D space.

Link copied to clipboard
fun gradCoord3D(seed: Int, x: Int, y: Int, z: Int, xd: Double, yd: Double, zd: Double): Double

Computes a gradient dot-product noise value for 3D coordinates based on the given seed and position inputs.

Link copied to clipboard
fun gradCoord4D(seed: Int, x: Int, y: Int, z: Int, w: Int, xd: Double, yd: Double, zd: Double, wd: Double): Double

Computes a gradient coordinate value in 4D space based on the provided inputs.

Link copied to clipboard
fun (Int, Double) -> Double.gradient(epsilon: Double = 1.0E-6): (Int, Double) -> Double
fun (Int, Double, Double) -> Vector2.gradient(epsilon: Double = 1.0E-6): (Int, Double, Double) -> Vector2
@JvmName(name = "IDDD_D_Gradient")
fun (Int, Double, Double, Double) -> Double.gradient(epsilon: Double = 1e-2 / 2.0): (Int, Double, Double, Double) -> Double
fun (Int, Double, Double, Double) -> Vector2.gradient(epsilon: Double = 1e-2 / 2.0): (Int, Double, Double, Double) -> Vector2
Link copied to clipboard
inline fun gradient1D(crossinline noise: (seed: Int, x: Double) -> Double, seed: Int, x: Double, epsilon: Double = 0.01): Double
Link copied to clipboard
inline fun gradient2D(crossinline noise: (seed: Int, x: Double, y: Double) -> Double, seed: Int, x: Double, y: Double, epsilon: Double = 0.01): Vector2
Link copied to clipboard
inline fun gradient3D(crossinline noise: (seed: Int, x: Double, y: Double, z: Double) -> Double, seed: Int, x: Double, y: Double, z: Double, epsilon: Double = 0.01): Vector3
Link copied to clipboard
inline fun gradient4D(crossinline noise: (seed: Int, x: Double, y: Double, z: Double, w: Double) -> Double, seed: Int, x: Double, y: Double, z: Double, w: Double, epsilon: Double = 0.01): Vector4
Link copied to clipboard
fun gradientPerturb(seed: Int, amplitude: Double, frequency: Double, position: Vector2, interpolator: (Double) -> Double = ::quintic): Vector2

Calculates a perturbed position based on gradient noise.

fun gradientPerturb(seed: Int, amplitude: Double, frequency: Double, position: Vector3, interpolator: (Double) -> Double = ::quintic): Vector3

Perturbs a position vector in 3D space by applying a gradient noise algorithm.

Link copied to clipboard
fun gradientPerturbFractal(seed: Int, amplitude: Double = 1.0, frequency: Double = 2.0, lacunarity: Double = 2.0, gain: Double = 0.5, octaves: Int = 4, position: Vector2, interpolator: (Double) -> Double = ::quintic): Vector2

Applies fractal gradient perturbation to the given position vector using the specified parameters. This method introduces multiple layers of noise to create a fractal effect by perturbing the position iteratively based on the number of octaves, frequency, and amplitude adjustments.

fun gradientPerturbFractal(seed: Int, amplitude: Double = 1.0, frequency: Double = 2.0, lacunarity: Double = 2.0, gain: Double = 0.5, octaves: Int = 4, position: Vector3, interpolator: (Double) -> Double = ::quintic): Vector3

Applies fractal gradient perturbation to a 3D position vector.

Link copied to clipboard
fun ShapeProvider.hash(pointCount: Int, seed: Int, x: Int): List<Vector2>

Generates a list of hashed points based on the shape's triangulation.

fun Double.Companion.hash(seed: Int, x: Int, min: Double = -1.0, max: Double = 1.0): Double

fun Vector2.Companion.hash(seed: Int, x: Int, min: Double = -1.0, max: Double = 1.0): Vector2

Generates a 2D hash-based vector using specified seed, input value, and range bounds.

fun Vector2.Companion.hash(seed: Int, x: Int, min: Vector2 = -ONE, max: Vector2 = ONE): Vector2

Generates a hash-based 2D vector based on the provided seed, input value, and range constraints.

Link copied to clipboard

Computes the Hermite interpolation function value for the given parameter.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun (Int, Double) -> Double.minMax(sampleCount: Int = 1000, percentile: Double, random: Random = Random(0)): Pair<Double, Double>
fun (Int, Double, Double) -> Double.minMax(sampleCount: Int = 1000, percentile: Double, random: Random = Random(0)): Pair<Double, Double>
fun (Int, Double, Double, Double) -> Double.minMax(sampleCount: Int = 1000, percentile: Double = 1.0, random: Random = Random(0)): Pair<Double, Double>
Link copied to clipboard
fun ShapeProvider.multiScatter(radii: List<Pair<Double, Double>>, distanceToEdge: Double = 0.0, tries: Int = 30, random: Random = Random.Default): List<Pair<Double, List<Vector2>>>

Returns a list of pairs in which the first component is a radius and the second component a list of Vector2 positions of items with that radius.

Link copied to clipboard
fun perlin(seed: Int, x: Double): Double
fun perlin(seed: Int, position: Vector2): Double
fun perlin(seed: Int, x: Double, y: Double): Double
inline fun perlin(seed: Int, x: Double, crossinline interpolator: (Double) -> Double): Double
inline fun perlin(seed: Int, x: Double, y: Double, crossinline interpolator: (Double) -> Double): Double
inline fun perlin(seed: Int, x: Double, y: Double, z: Double, crossinline interpolator: (Double) -> Double = ::linear): Double
Link copied to clipboard
fun perlinHermite(seed: Int, x: Double): Double
fun perlinHermite(seed: Int, position: Vector2): Double
fun perlinHermite(seed: Int, position: Vector3): Double
fun perlinHermite(seed: Int, x: Double, y: Double): Double
fun perlinHermite(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
fun perlinLinear(seed: Int, x: Double): Double
fun perlinLinear(seed: Int, position: Vector2): Double
fun perlinLinear(seed: Int, position: Vector3): Double
fun perlinLinear(seed: Int, x: Double, y: Double): Double
fun perlinLinear(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
fun perlinQuintic(seed: Int, x: Double): Double
fun perlinQuintic(seed: Int, position: Vector2): Double
fun perlinQuintic(seed: Int, position: Vector3): Double
fun perlinQuintic(seed: Int, x: Double, y: Double): Double
fun perlinQuintic(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
@JvmName(name = "perturb1")
fun (Int, Double) -> Double.perturb(distort: (Double) -> Double): (Int, Double) -> Double
@JvmName(name = "perturb2v")
inline fun (Int, Vector2) -> Double.perturb(crossinline distort: (Vector2) -> Vector2): (Int, Vector2) -> Double
@JvmName(name = "perturb3")
inline fun (Int, Vector3) -> Double.perturb(crossinline distort: (Vector3) -> Vector3): (Int, Vector3) -> Double
@JvmName(name = "perturb4")
inline fun (Int, Vector4) -> Double.perturb(crossinline distort: (Vector4) -> Vector4): (Int, Vector4) -> Double
@JvmName(name = "perturb2ds")
inline fun (Int, Double, Double) -> Double.perturb(crossinline distort: (Vector2) -> Vector2): (Int, Double, Double) -> Double
@JvmName(name = "perturb3ds")
inline fun (Int, Double, Double, Double) -> Double.perturb(crossinline distort: (Vector3) -> Vector3): (Int, Double, Double, Double) -> Double
Link copied to clipboard
fun poissonDiskSampling(bounds: Rectangle, radius: Double, tries: Int = 30, randomOnRing: Boolean = true, random: Random = Random.Default, initialPoints: List<Vector2> = listOf(bounds.center), obstacleHashGrids: List<HashGrid> = emptyList(), boundsMapper: (v: Vector2) -> Boolean? = null): List<Vector2>

Creates a random point distribution on a given area Each point gets n tries at generating the next point By default the points are generated along the circumference of r + epsilon to the point They can also be generated on a ring like in the original algorithm from Robert Bridson

Link copied to clipboard
fun polarFunc(noise: (Int, Double, Double) -> Double, origin: Vector2 = Vector2.ZERO): (seed: Int, polar: Polar) -> Double

Polar coordinate front-end for 2D noise functions

Link copied to clipboard
fun polarOffsetFunc(noise: (Int, Double, Double) -> Double, origin: Vector2 = Vector2.ZERO): (seed: Int, polar: Polar, offset: Vector2) -> Double

Polar coordinate front-end for 2D noise functions with variable offset

Link copied to clipboard

Calculates the result of the quintic polynomial function, commonly used in smooth interpolation.

Link copied to clipboard
fun random(min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): Double
Link copied to clipboard
inline fun rigid(seed: Int, x: Double, crossinline noise: (Int, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a rigid noise value using fractional Brownian motion (fBm) by combining multiple layers of noise.

inline fun rigid(seed: Int, position: Vector2, crossinline noise: (Int, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Computes a value based on a rigid multi-fractal noise function using a 2D position.

inline fun rigid(seed: Int, position: Vector3, crossinline noise: (Int, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Computes a multi-octave rigid noise value for a given position.

inline fun rigid(seed: Int, position: Vector4, crossinline noise: (Int, Double, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double
inline fun rigid(seed: Int, x: Double, y: Double, z: Double, w: Double, crossinline noise: (Int, Double, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a 4D rigid multi-octave noise value based on the provided parameters and noise function.

inline fun rigid(seed: Int, x: Double, y: Double, crossinline noise: (Int, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Computes a value based on a rigid multi-fractal noise function.

inline fun rigid(seed: Int, x: Double, y: Double, z: Double, crossinline noise: (Int, Double, Double, Double) -> Double, octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): Double

Generates a rigid multi-fractal noise value based on the given parameters.

Link copied to clipboard
fun (Int, Double) -> Double.rigid(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double) -> Double
fun (Int, Double, Double) -> Double.rigid(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double) -> Double
fun (Int, Double, Double, Double) -> Double.rigid(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double, Double) -> Double
fun (Int, Double, Double, Double, Double) -> Double.rigid(octaves: Int = 8, lacunarity: Double = 0.5, gain: Double = 0.5): (Int, Double, Double, Double, Double) -> Double
Link copied to clipboard
fun (Int, Double) -> Double.scaleShiftInput(scaleT: Double = 1.0, shiftT: Double = 0.0): (Int, Double) -> Double
fun (Int, Double, Double) -> Double.scaleShiftInput(scaleX: Double = 1.0, shiftX: Double = 0.0, scaleT: Double = 1.0, shiftT: Double = 0.0): (Int, Double, Double) -> Double
fun (Int, Double, Double, Double) -> Double.scaleShiftInput(scaleX: Double = 1.0, shiftX: Double = 0.0, scaleY: Double = 1.0, shiftY: Double = 0.0, scaleT: Double = 1.0, shiftT: Double = 0.0): (Int, Double, Double, Double) -> Double
fun (Int, Double, Double, Double, Double) -> Double.scaleShiftInput(scaleX: Double = 1.0, shiftX: Double = 0.0, scaleY: Double = 1.0, shiftY: Double = 0.0, scaleZ: Double = 1.0, shiftZ: Double = 0.0, scaleT: Double = 1.0, shiftT: Double = 0.0): (Int, Double, Double, Double, Double) -> Double
Link copied to clipboard
fun (Int, Double) -> Double.scaleShiftOutput(scale: Double = 1.0, bias: Double = 0.0): (Int, Double) -> Double
@JvmName(name = "scaleBiasVector2")
fun (Int, Vector2) -> Double.scaleShiftOutput(scale: Double = 1.0, bias: Double = 0.0): (Int, Vector2) -> Double
fun (Int, Double, Double) -> Double.scaleShiftOutput(scale: Double = 1.0, bias: Double = 0.0): (Int, Double, Double) -> Double
Link copied to clipboard
fun ShapeProvider.scatter(placementRadius: Double, objectRadius: Double = placementRadius, distanceToEdge: Double = 0.0, tries: Int = 30, obstacles: List<Pair<Double, List<Vector2>>> = emptyList(), random: Random = Random.Default): List<Vector2>

Returns a list of 2D points contained in the ShapeProvider. The algorithm iterates a maximum of tries times trying to find points that maintain the separation to each other specified via placementRadius while keeping a distanceToEdge distance to the contour of the shape.

Link copied to clipboard
fun simplex(seed: Int, x: Double): Double
fun simplex(seed: Int, position: Vector2): Double
fun simplex(seed: Int, position: Vector3): Double

fun simplex(seed: Int, position: Vector4): Double

Computes the 4D Simplex noise value at the given position and seed.

fun simplex(seed: Int, x: Double, y: Double): Double

Computes a 2D simplex noise value for given coordinates and seed.

fun simplex(seed: Int, x: Double, y: Double, z: Double): Double

Computes a 3D simplex noise value for the given coordinates and seed.

fun simplex(seed: Int, x: Double, y: Double, z: Double, w: Double): Double

Generates a 4D Simplex noise value based on the given coordinates and seed.

Link copied to clipboard
fun Vector2.Companion.simplex(seed: Int, x: Double): Vector2

Generates a 2D simplex noise vector based on the given seed and input position.

fun Vector3.Companion.simplex(seed: Int, x: Double): Vector3

Generates a 3D vector using simplex noise based on the given seed and x-coordinate.

fun Vector4.Companion.simplex(seed: Int, x: Double): Vector4

Generates a 4D vector using Simplex noise based on the given seed and 1D input. Each component of the vector is generated by shifting the input x-coordinate for different noise values.

Link copied to clipboard
fun uhash11(x: UInt): UInt

uniform hash function https://nullprogram.com/blog/2018/07/31/

Link copied to clipboard
fun uhash1D(seed: Int, x: Int): UInt
Link copied to clipboard
fun uhash2D(seed: Int, x: Int, y: Int): UInt
Link copied to clipboard
fun uhash3D(seed: Int, x: Int, y: Int, z: Int): UInt
Link copied to clipboard
fun uhash4D(seed: Int, x: Int, y: Int, z: Int, w: Int): UInt
Link copied to clipboard
fun Vector2.Companion.uniform(rect: Rectangle, random: Random = Random.Default): Vector2

Generates a random 2D vector uniformly distributed within the specified rectangular bounds.

fun ShapeProvider.uniform(pointCount: Int, random: Random = Random.Default): List<Vector2>

Generates a list of uniformly distributed points within the shape provided by the ShapeProvider.

fun Double.Companion.uniform(min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): Double

Generates a random double value within the specified range min, max.

fun Int.Companion.uniform(min: Int = -1, max: Int = 2, random: Random = Random.Default): Int

Generates a uniformly distributed random integer within the specified range.

fun IntVector2.Companion.uniform(min: Int = -1, max: Int = 2, random: Random = Random.Default): IntVector2

Generates a uniform random IntVector2 within the specified range.

fun IntVector2.Companion.uniform(min: IntVector2 = IntVector2(-1, -1), max: IntVector2 = IntVector2(2, 2), random: Random = Random.Default): IntVector2

Generates a random IntVector2 with each component within the specified ranges.

fun Vector2.Companion.uniform(min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): Vector2

Generates a random 2D vector with components uniformly distributed within the specified range.

fun Vector2.Companion.uniform(min: Vector2 = -ONE, max: Vector2 = ONE, random: Random = Random.Default): Vector2

Generates a random 2D vector with each component uniformly distributed within the specified ranges.

fun Vector3.Companion.uniform(min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): Vector3

Generates a random vector with each component uniformly distributed between the specified minimum and maximum bounds.

fun Vector3.Companion.uniform(min: Vector3 = -ONE, max: Vector3 = ONE, random: Random = Random.Default): Vector3

Generates a random vector with components uniformly distributed between the specified minimum and maximum bounds.

fun Vector4.Companion.uniform(min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): Vector4

Generates a random 4-dimensional vector with each component sampled uniformly from a specified range between min and max.

fun Vector4.Companion.uniform(min: Vector4 = -ONE, max: Vector4 = ONE, random: Random = Random.Default): Vector4

Generates a random 4-dimensional vector where each component is uniformly distributed within the provided range.

Link copied to clipboard
fun Vector2.Companion.uniformRing(innerRadius: Double = 0.0, outerRadius: Double = 1.0, random: Random = Random.Default): Vector2

Generates a random 2D vector uniformly distributed within a ring defined by the inner and outer radii.

fun Vector3.Companion.uniformRing(innerRadius: Double = 0.0, outerRadius: Double = 1.0, random: Random = Random.Default): Vector3

Generates a random 3D vector within a uniform ring defined by the provided inner and outer radii. The ring resides in a 3D space, and vectors are uniformly distributed within the specified range.

fun Vector4.Companion.uniformRing(innerRadius: Double = 0.0, outerRadius: Double = 1.0, random: Random = Random.Default): Vector4

Generates a uniformly distributed random 4D vector within a ring-shaped area defined by an inner and outer radius.

Link copied to clipboard
fun Vector2.Companion.uniforms(count: Int, rect: Rectangle, random: Random = Random.Default): List<Vector2>

Generates a list of uniformly distributed random points within a specified rectangular area.

fun Double.Companion.uniforms(count: Int, min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): List<Double>

Generates a list of random double values within the specified range.

fun Vector2.Companion.uniforms(count: Int, min: Vector2 = -ONE, max: Vector2 = ONE, random: Random = Random.Default): List<Vector2>

Generates a list of Vector2 instances, each initialized with random values within the specified range.

fun Vector3.Companion.uniforms(count: Int, min: Double = -1.0, max: Double = 1.0, random: Random = Random.Default): List<Vector3>
fun Vector3.Companion.uniforms(count: Int, min: Vector3 = -ONE, max: Vector3 = ONE, random: Random = Random.Default): List<Vector3>

Generates a list of uniformly distributed random Vector3 instances.

Link copied to clipboard
fun Vector2.Companion.uniformSequence(rect: Rectangle, random: Random = Random.Default): Sequence<Vector2>

Generates an infinite sequence of random Vector2 points uniformly distributed within the specified rectangle.

Link copied to clipboard
fun Vector2.Companion.uniformsRing(count: Int, innerRadius: Double = 0.0, outerRadius: Double = 1.0, random: Random = Random.Default): List<Vector2>

Generates a list of 2D vectors uniformly distributed within a ring defined by the inner and outer radii.

fun Vector3.Companion.uniformsRing(count: Int, innerRadius: Double = 0.0, outerRadius: Double = 1.0, random: Random = Random.Default): List<Vector3>

Generates a list of uniformly distributed random vectors within a ring defined by inner and outer radii.

Link copied to clipboard
fun (Int, Double) -> Double.unipolar(sampleCount: Int = 1000, percentile: Double = 1.0, random: Random = Random(0)): (Int, Double) -> Double
fun (Int, Double, Double) -> Double.unipolar(sampleCount: Int = 1000, percentile: Double = 1.0, random: Random = Random(0)): (Int, Double, Double) -> Double
fun (Int, Double, Double, Double) -> Double.unipolar(sampleCount: Int = 1000, percentile: Double = 1.0, random: Random = Random(0)): (Int, Double, Double, Double) -> Double
Link copied to clipboard
fun valCoord3D(seed: Int, x: Int, y: Int, z: Int): Double

Generates a pseudo-random value based on the input seed and 3D coordinates.

Link copied to clipboard
inline fun value(seed: Int, x: Double, crossinline interpolation: (Double) -> Double = ::linear): Double
inline fun value(seed: Int, x: Double, y: Double, crossinline interpolation: (Double) -> Double = ::linear): Double
inline fun value(seed: Int, x: Double, y: Double, z: Double, crossinline interpolation: (Double) -> Double = ::linear): Double
Link copied to clipboard
fun valueHermite(seed: Int, x: Double): Double
fun valueHermite(seed: Int, position: Vector2): Double
fun valueHermite(seed: Int, position: Vector3): Double
fun valueHermite(seed: Int, x: Double, y: Double): Double
fun valueHermite(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
fun valueLinear(seed: Int, x: Double): Double
fun valueLinear(seed: Int, position: Vector2): Double
fun valueLinear(seed: Int, position: Vector3): Double
fun valueLinear(seed: Int, x: Double, y: Double): Double
fun valueLinear(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
fun valueQuintic(seed: Int, x: Double): Double
fun valueQuintic(seed: Int, position: Vector2): Double
fun valueQuintic(seed: Int, position: Vector3): Double
fun valueQuintic(seed: Int, x: Double, y: Double): Double
fun valueQuintic(seed: Int, x: Double, y: Double, z: Double): Double
Link copied to clipboard
fun (Int, Double) -> Double.withFixedSeed(seed: Int): (Double) -> Double
Link copied to clipboard
fun (Int, Vector2) -> Double.withPolarInput(origin: Vector2 = Vector2.ZERO): (Int, Polar) -> Double
fun (Int, Double, Double) -> Double.withPolarInput(origin: Vector2 = Vector2.ZERO): (Int, Polar) -> Double
Link copied to clipboard
fun (Int, Vector2) -> Double.withPolarOffsetInput(origin: Vector2 = Vector2.ZERO): (Int, Polar, Vector2) -> Double
fun (Int, Double, Double) -> Double.withPolarOffsetInput(origin: Vector2 = Vector2.ZERO): (Int, Polar, Vector2) -> Double
Link copied to clipboard
fun (Int, Vector2) -> Double.withScalarInput(): (Int, Double, Double) -> Double
fun (Int, Vector3) -> Double.withScalarInput(): (Int, Double, Double, Double) -> Double
Link copied to clipboard
Link copied to clipboard
fun (Int, Double, Double) -> Double.withVector2Input(): (Int, Vector2) -> Double
Link copied to clipboard
fun (Int, Double) -> Double.withVector2Output(): (seed: Int, x: Double) -> Vector2
@JvmName(name = "polarWithVector2Output")
fun (Int, Polar) -> Double.withVector2Output(): (Int, Polar) -> Vector2
fun (Int, Double, Double) -> Double.withVector2Output(): (seed: Int, x: Double, y: Double) -> Vector2
fun (Int, Double, Double, Double) -> Double.withVector2Output(): (seed: Int, x: Double, y: Double, z: Double) -> Vector2
Link copied to clipboard
fun (Int, Double, Double, Double) -> Double.withVector3Input(): (Int, Vector3) -> Double
Link copied to clipboard