Class SimplexNoise

java.lang.Object
de.arstwo.twotil.math.SimplexNoise

public class SimplexNoise extends Object
Implementation of SimplexNoise for 2D, 3D and 4D
  • Field Details

    • doubledPermutationTable

      protected final short[] doubledPermutationTable
      Class members
    • variatedPermutationTable

      protected final short[] variatedPermutationTable
  • Constructor Details

    • SimplexNoise

      public SimplexNoise(Random random)
      Creates a new SimplexNoise with the given Random generator.
      Parameters:
      random - any Random compatible generator
  • Method Details

    • generateNoiseStretcher

      public NoiseStretch generateNoiseStretcher(double stretchX, double stretchZ)
      Generates a stretched 2D view of this noise with the given values.
      Parameters:
      stretchX - how much the x-axis is stretched
      stretchZ - how much the z-axis is stretched
      Returns:
      a NoiseStretch with the given configuration.
    • generateNoiseStretcher

      public NoiseStretch generateNoiseStretcher(double stretchX, double stretchY, double stretchZ)
      Generates a stretched 3D view of this noise with the given values.
      Parameters:
      stretchX - how much the x-axis is stretched
      stretchY - how much the y-axis is stretched
      stretchZ - how much the z-axis is stretched
      Returns:
      a NoiseStretch with the given configuration.
    • noise

      public double noise(double xin, double yin)
      Noise value at a given 2D position
      Parameters:
      xin - any double
      yin - any double
      Returns:
      the noise value at the given 2D position
    • noise

      public double noise(double xin, double yin, double zin)
      Noise value at a given 3D position
      Parameters:
      xin - any double
      yin - any double
      zin - any double
      Returns:
      the noise value at the given 3D position
    • noise

      public double noise(double x, double y, double z, double w)
      Noise value at a given 4D position
      Parameters:
      x - any double
      y - any double
      z - any double
      w - any double
      Returns:
      the noise value at the given 4D position