-
Method Summary
Modifier and TypeMethodDescriptionstatic doublegradientCoherentNoise3D(double x, double y, double z, int seed, NoiseQuality quality) Generates a gradient-coherent-noise value from the coordinates of a three-dimensional input value.static doublegradientNoise3D(double fx, double fy, double fz, int ix, int iy, int iz, int seed) Generates a gradient-noise value from the coordinates of a three-dimensional input value and the integer coordinates of a nearby three-dimensional value.static intintValueNoise3D(int x, int y, int z, int seed) Generates an integer-noise value from the coordinates of a three-dimensional input value.static doublesimplexStyleGradientCoherentNoise3D(double x, double y, double z, int seed, LatticeOrientation orientation, NoiseQualitySimplex quality) Generates a simplex-style gradient coherent noise value from the coordinates of a three-dimensional input value.static doublevalueCoherentNoise3D(double x, double y, double z, int seed, NoiseQuality quality) Generates a value-coherent-noise value from the coordinates of a three-dimensional input value.static doublevalueNoise3D(int x, int y, int z, int seed) Generates a value-noise value from the coordinates of a three-dimensional input value.
-
Method Details
-
simplexStyleGradientCoherentNoise3D
public static double simplexStyleGradientCoherentNoise3D(double x, double y, double z, int seed, LatticeOrientation orientation, NoiseQualitySimplex quality) Generates a simplex-style gradient coherent noise value from the coordinates of a three-dimensional input value.Does not use the classic Simplex noise algorithm, but an alternative. Adapted from the following URLs: https://github.com/KdotJPG/New-Simplex-Style-Gradient-Noise/blob/master/java/FastSimplexStyleNoise.java https://github.com/KdotJPG/New-Simplex-Style-Gradient-Noise/blob/master/java/SuperSimplexNoise.java
The return value ranges from 0 to 1.
- Parameters:
x- Thexcoordinate of the input value.y- Theycoordinate of the input value.z- Thezcoordinate of the input value.seed- The random number seed.orientation- The lattice orientation of the simplex-style coherent noise. See documentation forLatticeOrientation.quality- The quality of the simplex-style coherent noise.- Returns:
- The generated gradient-coherent-noise value.
-
gradientCoherentNoise3D
public static double gradientCoherentNoise3D(double x, double y, double z, int seed, NoiseQuality quality) Generates a gradient-coherent-noise value from the coordinates of a three-dimensional input value.The return value ranges from 0 to 1.
For an explanation of the difference between gradient noise and value noise, see the comments for the
gradientNoise3D(double, double, double, int, int, int, int)function.- Parameters:
x- Thexcoordinate of the input value.y- Theycoordinate of the input value.z- Thezcoordinate of the input value.seed- The random number seed.quality- The quality of the coherent-noise.- Returns:
- The generated gradient-coherent-noise value.
-
gradientNoise3D
public static double gradientNoise3D(double fx, double fy, double fz, int ix, int iy, int iz, int seed) Generates a gradient-noise value from the coordinates of a three-dimensional input value and the integer coordinates of a nearby three-dimensional value.The difference between fx and ix must be less than or equal to one. The difference between
fyandiymust be less than or equal to one. The difference betweenfzandizmust be less than or equal to one.A gradient-noise function generates better-quality noise than a value-noise function. Most noise modules use gradient noise for this reason, although it takes much longer to calculate.
The return value ranges from 0 to 1.
This function generates a gradient-noise value by performing the following steps:
- It first calculates a random normalized vector based on the nearby integer value passed to this function.
- It then calculates a new value by adding this vector to the nearby integer value passed to this function.
- It then calculates the dot product of the above-generated value and the floating-point input value passed to this function.
A noise function differs from a random-number generator because it always returns the same output value if the same input value is passed to it.
- Parameters:
fx- The floating-pointxcoordinate of the input value.fy- The floating-pointycoordinate of the input value.fz- The floating-pointzcoordinate of the input value.ix- The integerxcoordinate of a nearby value.iy- The integerycoordinate of a nearby value.iz- The integerzcoordinate of a nearby value.seed- The random number seed.- Returns:
- The generated gradient-noise value.
-
intValueNoise3D
public static int intValueNoise3D(int x, int y, int z, int seed) Generates an integer-noise value from the coordinates of a three-dimensional input value.The return value ranges from
0to2147483647.A noise function differs from a random-number generator because it always returns the same output value if the same input value is passed to it.
- Parameters:
x- The integerxcoordinate of the input value.y- The integerycoordinate of the input value.z- The integerzcoordinate of the input value.seed- A random number seed.- Returns:
- The generated integer-noise value.
-
valueCoherentNoise3D
public static double valueCoherentNoise3D(double x, double y, double z, int seed, NoiseQuality quality) Generates a value-coherent-noise value from the coordinates of a three-dimensional input value.- Parameters:
x- Thexcoordinate of the input value.y- Theycoordinate of the input value.z- Thezcoordinate of the input value.seed- The random number seed.quality- The quality of the coherent-noise.- Returns:
- The generated value-coherent-noise value.
The return value ranges from 0 to 1.
For an explanation of the difference between gradient noise and value noise, see the comments for
gradientNoise3D(double, double, double, int, int, int, int).
-
valueNoise3D
public static double valueNoise3D(int x, int y, int z, int seed) Generates a value-noise value from the coordinates of a three-dimensional input value.The return value ranges from 0 to 1.
A noise function differs from a random-number generator because it always returns the same output value if the same input value is passed to it.
- Parameters:
x- Thexcoordinate of the input value.y- Theycoordinate of the input value.z- Thezcoordinate of the input value.seed- A random number seed.- Returns:
- The generated value-noise value.
-