static public float noise(float x, float y, float z) {
        int X = ShaderUtils.floor(x), // FIND UNIT CUBE THAT
        Y = ShaderUtils.floor(y), // CONTAINS POINT.
        Z = ShaderUtils.floor(z);
        x -= X; // FIND RELATIVE X,Y,Z
        y -= Y; // OF POINT IN CUBE.
        z -= Z;
        X = X & 255;
        Y = Y & 255;
        Z = Z & 255;
        float u = ImprovedNoise.fade(x), // COMPUTE FADE CURVES
        v = ImprovedNoise.fade(y), // FOR EACH OF X,Y,Z.
        w = ImprovedNoise.fade(z);
        int A = ImprovedNoise.p[X] + Y;
        int AA = ImprovedNoise.p[A] + Z;
        int AB = ImprovedNoise.p[A + 1] + Z;
        int B = ImprovedNoise.p[X + 1] + Y;
        int BA = ImprovedNoise.p[B] + Z;
        int BB = ImprovedNoise.p[B + 1] + Z;

        return ImprovedNoise.lerp(
                w,
                ImprovedNoise.lerp(
                        v,
                        ImprovedNoise.lerp(u, ImprovedNoise.grad3(ImprovedNoise.p[AA], x, y, z),
                                ImprovedNoise.grad3(ImprovedNoise.p[BA], x - 1, y, z)), // BLENDED
                        ImprovedNoise.lerp(u, ImprovedNoise.grad3(ImprovedNoise.p[AB], x, y - 1, z), // RESULTS
                                ImprovedNoise.grad3(ImprovedNoise.p[BB], x - 1, y - 1, z))),// FROM
                ImprovedNoise.lerp(v,
                        ImprovedNoise.lerp(u, ImprovedNoise.grad3(ImprovedNoise.p[AA + 1], x, y, z - 1), // CORNERS
                                ImprovedNoise.grad3(ImprovedNoise.p[BA + 1], x - 1, y, z - 1)), // OF
                        ImprovedNoise.lerp(u, ImprovedNoise.grad3(ImprovedNoise.p[AB + 1], x, y - 1, z - 1),
                                ImprovedNoise.grad3(ImprovedNoise.p[BB + 1], x - 1, y - 1, z - 1))));
    }
Perlin's default implementation of Improved Perlin Noise
designed to work with Noise base
jme3-terrain/src/main/java/com/jme3/terrain/noise/basis/ImprovedNoise.java