render
Class ImprovedNoise
java.lang.Object
|
+--render.ImprovedNoise
- public final class ImprovedNoise
- extends java.lang.Object
Improved version of Noise
.
Algorithm:
Find unit cube that contains point (x, y, z).
Find the relative x,y,z of the point in the cube.
Compute the fade curves for each of x,y,z.
Hash coordinates of the eight cube corners and add blended results from the
eight corners of the cube.
Return the sum.
Method Summary |
static double |
noise(double x,
double y,
double z)
Computes the Perlin noise function value at the point (x, y, z). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImprovedNoise
public ImprovedNoise()
noise
public static double noise(double x,
double y,
double z)
- Computes the Perlin noise function value at the point (x, y, z).
- Parameters:
x
- x coordinatey
- y coordinatez
- z coordinate
- Returns:
- the noise function value at (x, y, z)