random noise
0.0.0Functions to generate various types of noise such as Perlin or Value noise
Table of Contents
About random-noise
This library provides a variety of "coherent" noise generation functions. These types of noise are primarily used in procedural generation for visual effects and games.
How To
The library provides the following types of noise, in 1D, 2D, and 3D each:
Each type of noise generation follows a basic argument structure:
position
Thepoint
at which to evaluate the noise. For 1D noise this should be a single-float, for 2D and 3D noise a vector of single-floats.frequency
The frequency of the noise signal, essentially a scaling factor. You can think of it as increased frequency squeezing more of the noise into the same domain.xxhash
The hashing value used as the randomness source. If you want to use a particular seed to initialise the noise with, derive the hash via thexxhash
function.
Some types of noise, such as lattice
, voronoi
, and fractal
noise take additional arguments. In particular value
, perlin
, and simplex
are shorthands for specific types of lattice
noise, and worley
, smooth-worley
, and chebyshev
are shorthands for specific types of voronoi
noise. The fractal
noise is based on another noise function by combining multiple "octaves" or levels of the same noise.
Each type of noise generator returns a sample
, which is (up to) four values based on the dimensionality of the noise:
The value of the noise at the point.
The partial derivative of the noise in X.
The partial derivative of the noise in Y.
The partial derivative of the noise in Z.
The partial derivatives returned are analytical and thus more accurate than if one simply used a finite differences approach to approximate the derivative.
All of these functions evaluate a specific point. In order to sample an entire domain of noise at a specific resolution, you can use the sample/1d
, sample/2d
and sample/3d
functions.
While you can always use the standard multiple-value-bind
to capture the sample values, you can also use the provided with-sample
and with-samples
for a slightly more convenient interface.
Finally, you can also compute the curl of a 2D or 3D noise field using curl/2d
and curl/3d
respectively, or apply the turbulence operator to a sample using turbulence!
.
See Also
You may also be interested in the following related projects:
random-state
Various portable random number generator implementations.random-sampling
Various sampling distribution functions and volume sampling functions.
Attribution
Most of the code in this is based on the excellent resources by Jasper Flick on catlikecoding.com
System Information
Definition Index
-
ORG.SHIRAKUMO.RANDOM-NOISE
No documentation provided.-
EXTERNAL STRUCTURE LATTICE
Internal representation of lattice data. See LATTICE
-
EXTERNAL STRUCTURE VORONOI-METHOD
Description of a voronoi distance method. This object is opaque. See VORONOI-METHOD See VORONOI
-
EXTERNAL TYPE-DEFINITION POINT
Representation of a point in a dimensional space. For 1D this is a single-float. For any higher dimension this is a (SIMPLE-ARRAY SINGLE-FLOAT (SIZE)). If no size is given, this type is a combination of all possible types it may return.
-
EXTERNAL TYPE-DEFINITION SAMPLE
Representation of a noise sample as multiple values. The values of a sample are four single floats, making up The actual noise value, in the range [-1, +1] The partial derivative in x The partial derivative in y The partial derivative in z If the partial derivative does not exist (such as in z for a 1d or 2d noise generator) then that derivative is constantly 0. See SAMPLE See WITH-SAMPLE
-
EXTERNAL TYPE-DEFINITION XXHASH
Representation of a hashing state. This is an (UNSIGNED-BYTE 32) and must be used for every function that accepts an XXHASH argument. If you would like to initialise the hash based on a seed, it is preferable to use the XXHASH function to initially hash the seed, rather than using the seed directly.
-
EXTERNAL FUNCTION CHEBYSHEV
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a voronoi-chebyshev noise sample. This is a shorthand for using VORONOI with the :CHEBYSHEV VORONOI-METHOD. See CHEBYSHEV/1D See CHEBYSHEV/2D See CHEBYSHEV/3D See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION CHEBYSHEV/1D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 1D voronoi-chebyshev noise sample. This is a shorthand for using VORONOI/1D with the :CHEBYSHEV VORONOI-METHOD. See CHEBYSHEV See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION CHEBYSHEV/2D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 2D voronoi-chebyshev noise sample. This is a shorthand for using VORONOI/2D with the :CHEBYSHEV VORONOI-METHOD. See CHEBYSHEV See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION CHEBYSHEV/3D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 3D voronoi-chebyshev noise sample. This is a shorthand for using VORONOI/3D with the :CHEBYSHEV VORONOI-METHOD. See CHEBYSHEV See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION CURL/2D
- POSITION
- FREQUENCY
- XXHASH
- GENERATOR
Perform the curl operator on a noise sample. Returns the original noise sample and the curling vector in the sample's derivatives. The FUNCTION must be a sampling function that returns a SAMPLE and accepts (at least) the following arguments in order: POINT FREQUENCY XXHASH See CURL/3D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION CURL/3D
- POSITION
- FREQUENCY
- XXHASH
- GENERATOR
- &OPTIONAL
- OFFSET
Perform the curl operator on a noise sample. Returns an averaging of the noise sample and the curling vector in the sample's derivatives. Three samples are taken in order to estimate the curl, using the OFFSET to step away from the central sampling point. The FUNCTION must be a sampling function that returns a SAMPLE and accepts (at least) the following arguments in order: POINT FREQUENCY XXHASH See CURL/2D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION FRACTAL
- POSITION
- FREQUENCY
- XXHASH
- GENERATOR
- &KEY
- OCTAVES
- LACUNARITY
- PERSISTENCE
Generate a fractal noise sample. Fractal noise is generated based on another noise generator and combining the noise at different resolutions. The GENERATOR must be a sampling function that returns a SAMPLE and accepts the following arguments in order: POINT FREQUENCY XXHASH OCTAVES is the number of resolutions to sample from. At each successive resolution, the frequency is attenuated by the LACUNARITY factor, and the amplitude of the signal is attenuated by the PERSISTENCE factor. See FRACTAL/1D See FRACTAL/2D See FRACTAL/3D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION FRACTAL/1D
- POSITION
- FREQUENCY
- XXHASH
- GENERATOR
- &KEY
- OCTAVES
- LACUNARITY
- PERSISTENCE
Generate a 1D fractal noise sample. Fractal noise is generated based on another noise generator and combining the noise at different resolutions. The GENERATOR must be a sampling function that returns a SAMPLE and accepts the following arguments in order: POINT FREQUENCY XXHASH OCTAVES is the number of resolutions to sample from. At each successive resolution, the frequency is attenuated by the LACUNARITY factor, and the amplitude of the signal is attenuated by the PERSISTENCE factor. See FRACTAL See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION FRACTAL/2D
- POSITION
- FREQUENCY
- XXHASH
- GENERATOR
- &KEY
- OCTAVES
- LACUNARITY
- PERSISTENCE
Generate a 2D fractal noise sample. Fractal noise is generated based on another noise generator and combining the noise at different resolutions. The GENERATOR must be a sampling function that returns a SAMPLE and accepts the following arguments in order: POINT FREQUENCY XXHASH OCTAVES is the number of resolutions to sample from. At each successive resolution, the frequency is attenuated by the LACUNARITY factor, and the amplitude of the signal is attenuated by the PERSISTENCE factor. See FRACTAL See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION FRACTAL/3D
- POSITION
- FREQUENCY
- XXHASH
- GENERATOR
- &KEY
- OCTAVES
- LACUNARITY
- PERSISTENCE
Generate a 3D fractal noise sample. Fractal noise is generated based on another noise generator and combining the noise at different resolutions. The GENERATOR must be a sampling function that returns a SAMPLE and accepts the following arguments in order: POINT FREQUENCY XXHASH OCTAVES is the number of resolutions to sample from. At each successive resolution, the frequency is attenuated by the LACUNARITY factor, and the amplitude of the signal is attenuated by the PERSISTENCE factor. See FRACTAL See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION LATTICE
- POSITION
- FREQUENCY
- XXHASH
- LATTICE
- GRADIENT
Generate a noise sample based on a lattice and gradient function. The lattice should be a function of three arguments: COORDINATE, FREQUENCY, LATTICE Wherein it writes the lattice information into the provided final argument. The gradient should be a function of four arguments: XXHASH, X-COORDINATE, Y-COORDINATE, Z-COORDINATE See LATTICE/1D See LATTICE/2D See LATTICE/3D See NORMAL-LATTICE See TILING-LATTICE See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION LATTICE/1D
- POSITION
- FREQUENCY
- XXHASH
- LATTICE
- GRADIENT
Generate a 1D noise sample based on a lattice and gradient function. The lattice should be a function of three arguments: COORDINATE, FREQUENCY, LATTICE Wherein it writes the lattice information into the provided final argument. The gradient should be a function of two arguments: XXHASH, X-COORDINATE See LATTICE See NORMAL-LATTICE See TILING-LATTICE See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION LATTICE/2D
- POSITION
- FREQUENCY
- XXHASH
- LATTICE
- GRADIENT
Generate a 2D noise sample based on a lattice and gradient function. The lattice should be a function of three arguments: COORDINATE, FREQUENCY, LATTICE Wherein it writes the lattice information into the provided final argument. The gradient should be a function of three arguments: XXHASH, X-COORDINATE, Y-COORDINATE See LATTICE See NORMAL-LATTICE See TILING-LATTICE See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION LATTICE/3D
- POSITION
- FREQUENCY
- XXHASH
- LATTICE
- GRADIENT
Generate a 3D noise sample based on a lattice and gradient function. The lattice should be a function of three arguments: COORDINATE, FREQUENCY, LATTICE Wherein it writes the lattice information into the provided final argument. The gradient should be a function of four arguments: XXHASH, X-COORDINATE, Y-COORDINATE, Z-COORDINATE See LATTICE See NORMAL-LATTICE See TILING-LATTICE See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION NORMAL-LATTICE
- COORDINATE
- FREQUENCY
- &OPTIONAL
- LATTICE
Generates a standard, non-repeating lattice. See TILING-LATTICE See LATTICE
-
EXTERNAL FUNCTION PERLIN
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a perlin noise sample. This is a shorthand for generating lattice noise based on the perlin gradient. See LATTICE See VALUE/1D See VALUE/2D See VALUE/3D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION PERLIN-GRADIENT/1D
- XXHASH
- X
-
EXTERNAL FUNCTION PERLIN-GRADIENT/2D
- XXHASH
- X
- Y
-
EXTERNAL FUNCTION PERLIN-GRADIENT/3D
- XXHASH
- X
- Y
- Z
-
EXTERNAL FUNCTION PERLIN/1D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 1D perlin noise sample. This is a shorthand for generating lattice noise based on the perlin gradient. See LATTICE See PERLIN See PERLIN-GRADIENT/1D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION PERLIN/2D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 2D perlin noise sample. This is a shorthand for generating lattice noise based on the perlin gradient. See LATTICE See PERLIN See PERLIN-GRADIENT/2D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION PERLIN/3D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 3D perlin noise sample. This is a shorthand for generating lattice noise based on the perlin gradient. See LATTICE See PERLIN See PERLIN-GRADIENT/3D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SAMPLE
- V
- &OPTIONAL
- DX
- DY
- DZ
Return a sample This normalises the return value to always be a SAMPLE type, regardless of the available derivatives. See SAMPLE (type)
-
EXTERNAL FUNCTION SAMPLE/1D
- RESOLUTION
- FREQUENCY
- XXHASH
- FUNCTION
- &REST
- ARGS
Sample a noise function in the domain [0,1] with the given resolution. Returns two arrays: the values, and the partial derivatives. All arrays have length (resolution+1)^1. The FUNCTION must be a sampling function that returns a SAMPLE and accepts (at least) the following arguments in order: POINT FREQUENCY XXHASH To each call of the sampling function the ARGS are appended as well. See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SAMPLE/2D
- RESOLUTION
- FREQUENCY
- XXHASH
- FUNCTION
- &REST
- ARGS
Sample a noise function in the domain [[0,1],[0,1]] with the given resolution. Returns three arrays: the values, and the partial derivatives. All arrays have length (resolution+1)^2. The FUNCTION must be a sampling function that returns a SAMPLE and accepts (at least) the following arguments in order: POINT FREQUENCY XXHASH To each call of the sampling function the ARGS are appended as well. See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SAMPLE/3D
- RESOLUTION
- FREQUENCY
- XXHASH
- FUNCTION
- &REST
- ARGS
Sample a noise function in the domain [[0,1],[0,1],[0,1]] with the given resolution. Returns four arrays: the values, and the partial derivatives. All arrays have length (resolution+1)^3. The FUNCTION must be a sampling function that returns a SAMPLE and accepts (at least) the following arguments in order: POINT FREQUENCY XXHASH To each call of the sampling function the ARGS are appended as well. See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SIMPLEX
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a simplex noise sample. This is a shorthand for generating lattice noise based on the simplex gradient. See LATTICE See SIMPLEX/1D See SIMPLEX/2D See SIMPLEX/3D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SIMPLEX-GRADIENT/1D
- XXHASH
- X
Draw a sample from the simplex gradient at the given position. See SIMPLEX/1D See LATTICE
-
EXTERNAL FUNCTION SIMPLEX-GRADIENT/2D
- XXHASH
- X
- Y
Draw a sample from the simplex gradient at the given position. See SIMPLEX/2D See LATTICE
-
EXTERNAL FUNCTION SIMPLEX-GRADIENT/3D
- XXHASH
- X
- Y
- Z
Draw a sample from the simplex gradient at the given position. See SIMPLEX/3D See LATTICE
-
EXTERNAL FUNCTION SIMPLEX/1D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 1D simplex noise sample. This is a shorthand for generating lattice noise based on the simplex gradient. See LATTICE See SIMPLEX See SIMPLEX-GRADIENT/1D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SIMPLEX/2D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 2D simplex noise sample. This is a shorthand for generating lattice noise based on the simplex gradient. See LATTICE See SIMPLEX See SIMPLEX-GRADIENT/2D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SIMPLEX/3D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 3D simplex noise sample. This is a shorthand for generating lattice noise based on the simplex gradient. See LATTICE See SIMPLEX See SIMPLEX-GRADIENT/3D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SMOOTH-WORLEY
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a voronoi-smooth-worley noise sample. This is a shorthand for using VORONOI with the :SMOOTH-WORLEY VORONOI-METHOD. See SMOOTH-WORLEY/1D See SMOOTH-WORLEY/2D See SMOOTH-WORLEY/3D See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SMOOTH-WORLEY/1D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 1D voronoi-smooth-worley noise sample. This is a shorthand for using VORONOI/1D with the :WORLEY VORONOI-METHOD. See SMOOTH-WORLEY See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SMOOTH-WORLEY/2D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 2D voronoi-smooth-worley noise sample. This is a shorthand for using VORONOI/2D with the :SMOOTH-WORLEY VORONOI-METHOD. See SMOOTH-WORLEY See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SMOOTH-WORLEY/3D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 3D voronoi-smooth-worley noise sample. This is a shorthand for using VORONOI/3D with the :SMOOTH-WORLEY VORONOI-METHOD. See SMOOTH-WORLEY See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION SMOOTHSTEP
- V
- &OPTIONAL
- DX
- DY
- DZ
Return a smoothed version of the passed sample parts. See SMOOTHSTEP! See SAMPLE (type)
-
EXTERNAL FUNCTION TILING-LATTICE
- COORDINATE
- FREQUENCY
- &OPTIONAL
- LATTICE
Generates a repeating lattice that tiles smoothly across its boundaries. See NORMAL-LATTICE See LATTICE
-
EXTERNAL FUNCTION TURBULENCE
- V
- &OPTIONAL
- DX
- DY
- DZ
Return the sample parts after applying the turbulence operator to them. See TURBULENCE! See SAMPLE (type)
-
EXTERNAL FUNCTION VALUE
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a value noise sample. This is a shorthand for generating lattice noise based on the value gradient. See LATTICE See VALUE/1D See VALUE/2D See VALUE/3D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION VALUE-GRADIENT/1D
- XXHASH
- X
-
EXTERNAL FUNCTION VALUE-GRADIENT/2D
- XXHASH
- X
- Y
-
EXTERNAL FUNCTION VALUE-GRADIENT/3D
- XXHASH
- X
- Y
- Z
-
EXTERNAL FUNCTION VALUE/1D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 1D value noise sample. This is a shorthand for generating lattice noise based on the value gradient. See LATTICE See VALUE See VALUE-GRADIENT/1D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION VALUE/2D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 2D value noise sample. This is a shorthand for generating lattice noise based on the value gradient. See LATTICE See VALUE See VALUE-GRADIENT/2D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION VALUE/3D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
Generate a 3D value noise sample. This is a shorthand for generating lattice noise based on the value gradient. See LATTICE See VALUE See VALUE-GRADIENT/3D See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION VORONOI
- POSITION
- FREQUENCY
- XXHASH
- LATTICE
- METHOD
- &OPTIONAL
- FUNCTION
Generate a voronoi noise sample. Voronoi noise is generated based on a lattice, a voronoi distance method, and a combination function. The lattice should be a function of three arguments: COORDINATE, FREQUENCY, LATTICE Wherein it writes the lattice information into the provided final argument. METHOD must be a VORONOI-METHOD instance appropriate for this function's dimensionality. FUNCTION may either be :F1, :F2, or :F2-F1, selecting the first, the second, or the subtraction of the samples respectively. See NORMAL-LATTICE See TILING-LATTICE See VORONOI/1D See VORONOI/2D See VORONOI/3D See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION VORONOI-METHOD
- TYPE
- ARITY
Returns a voronoi-method instance for the requested type and arity. If no such method exists, an error is returned. The following methods are provided by the library: :WORLEY :SMOOTH-WORLEY :CHEBYSHEV See VORONOI-METHOD (type) See VORONOI
-
EXTERNAL FUNCTION (SETF VORONOI-METHOD)
- METHOD
- TYPE
- ARITY
No documentation provided. -
EXTERNAL FUNCTION VORONOI/1D
- POSITION
- FREQUENCY
- XXHASH
- LATTICE
- METHOD
- &OPTIONAL
- FUNCTION
Generate a 1D voronoi noise sample. See VORONOI See NORMAL-LATTICE See TILING-LATTICE See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION VORONOI/2D
- POSITION
- FREQUENCY
- XXHASH
- LATTICE
- METHOD
- &OPTIONAL
- FUNCTION
Generate a 2D voronoi noise sample. See VORONOI See NORMAL-LATTICE See TILING-LATTICE See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION VORONOI/3D
- POSITION
- FREQUENCY
- XXHASH
- LATTICE
- METHOD
- &OPTIONAL
- FUNCTION
Generate a 3D voronoi noise sample. See VORONOI See NORMAL-LATTICE See TILING-LATTICE See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION WORLEY
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a voronoi-worley noise sample. This is a shorthand for using VORONOI with the :WORLEY VORONOI-METHOD. See WORLEY/1D See WORLEY/2D See WORLEY/3D See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION WORLEY/1D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 1D voronoi-worley noise sample. This is a shorthand for using VORONOI/1D with the :WORLEY VORONOI-METHOD. See WORLEY See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION WORLEY/2D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 2D voronoi-worley noise sample. This is a shorthand for using VORONOI/2D with the :WORLEY VORONOI-METHOD. See WORLEY See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION WORLEY/3D
- POSITION
- FREQUENCY
- XXHASH
- &OPTIONAL
- LATTICE
- FUNCTION
Generate a 3D voronoi-worley noise sample. This is a shorthand for using VORONOI/3D with the :WORLEY VORONOI-METHOD. See WORLEY See VORONOI See VORONOI-METHOD See XXHASH (type) See POINT (type) See SAMPLE (type)
-
EXTERNAL FUNCTION XXHASH
- &OPTIONAL
- SEED
Construct an xxhash from a seed. The seed should be an (UNSIGNED-BYTE 32). If none is provided, 1 is used instead. See XXHASH (type)
-
EXTERNAL MACRO SMOOTHSTEP!
- SAMPLER
Return a smoothed version of the given sample value. See SMOOTHSTEP See SAMPLE (type)
-
EXTERNAL MACRO TURBULENCE!
- SAMPLER
Return the given sample value after applying the turbulence operator to it. See TURBULENCE See SAMPLE (type)
-
EXTERNAL MACRO WITH-SAMPLE
- SPEC
- S
- &BODY
- BODY
Bind the sample components to local variables. SPEC may either be a list of bindings in order of VALUE, DX, DY, DZ, or it may be a single symbol, which is used for VALUE, wherein the derivative symbols are derived from that symbol by appending DX, DY, DZ respectively. See SAMPLE (type) See WITH-SAMPLES
-
EXTERNAL MACRO WITH-SAMPLES
- SPECS
- &BODY
- BODY
Bind one or more samples to local variables. The samples are bound as if by LET*, where each element in SPECS is made up of the binding spec and the sample value form, as per WITH-SAMPLE. See SAMPLE (type) See WITH-SAMPLE
-