Package org.joml
Class SimplexNoise
- java.lang.Object
-
- org.joml.SimplexNoise
-
public class SimplexNoise extends java.lang.Object
A simplex noise algorithm for 2D, 3D and 4D input.It was originally authored by Stefan Gustavson.
The original implementation can be found here: http://http://staffwww.itn.liu.se/.
-
-
Constructor Summary
Constructors Constructor Description SimplexNoise()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static float
noise(float x, float y)
Compute 2D simplex noise for the given input vector(x, y)
.static float
noise(float x, float y, float z)
Compute 3D simplex noise for the given input vector(x, y, z)
.static float
noise(float x, float y, float z, float w)
Compute 4D simplex noise for the given input vector(x, y, z, w)
.
-
-
-
Method Detail
-
noise
public static float noise(float x, float y)
Compute 2D simplex noise for the given input vector(x, y)
.The result is in the range
[-1..+1]
.- Parameters:
x
- the x coordinatey
- the y coordinate- Returns:
- the noise value (within
[-1..+1]
)
-
noise
public static float noise(float x, float y, float z)
Compute 3D simplex noise for the given input vector(x, y, z)
.The result is in the range
[-1..+1]
.- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinate- Returns:
- the noise value (within
[-1..+1]
)
-
noise
public static float noise(float x, float y, float z, float w)
Compute 4D simplex noise for the given input vector(x, y, z, w)
.The result is in the range
[-1..+1]
.- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinatew
- the w coordinate- Returns:
- the noise value (within
[-1..+1]
)
-
-