Class PerlinNoiseGenerator
- java.lang.Object
-
- org.pushingpixels.radiance.theming.internal.utils.PerlinNoiseGenerator
-
public class PerlinNoiseGenerator extends java.lang.ObjectA class for producing Perlin-inspired noise. The code written by Ken Perlin.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static int[]pPermutations.(package private) static int[]permutationPermutations.
-
Constructor Summary
Constructors Constructor Description PerlinNoiseGenerator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static doublefade(double t)Fades the specified value.(package private) static doublegrad(int hash, double x, double y, double z)(package private) static doublelerp(double t, double a, double b)Interpolates the specified value.static doublenoise(double x, double y, double z)Returns noise for the specified coordinates.
-
-
-
Method Detail
-
noise
public static double noise(double x, double y, double z)Returns noise for the specified coordinates.- Parameters:
x- X coordinate.y- Y coordinate.z- Z coordinate.- Returns:
- Noise for the specified coordinates.
-
fade
static double fade(double t)
Fades the specified value.- Parameters:
t- Value to fade.- Returns:
- faded value.
-
lerp
static double lerp(double t, double a, double b)Interpolates the specified value.- Parameters:
t- Value.a- Starting interpolation value.b- Ending interpolation value.- Returns:
- Interpolated value.
-
grad
static double grad(int hash, double x, double y, double z)- Parameters:
hash-x-y-z-- Returns:
-
-