Package org.joml

Class SimplexNoise



  • public class SimplexNoise
    extends 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 Detail

      • SimplexNoise

        public SimplexNoise​()
    • 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 coordinate
        y - 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 coordinate
        y - the y coordinate
        z - 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 coordinate
        y - the y coordinate
        z - the z coordinate
        w - the w coordinate
        Returns:
        the noise value (within [-1..+1])