Class PerlinNoiseGenerator2d

java.lang.Object
imagingbook.common.noise.perlin.PerlinNoiseGenerator
imagingbook.common.noise.perlin.PerlinNoiseGenerator2d

This class implements a 2D Perlin noise [1] generator. See Ch. 8 of [2] for details.

[1] K. Perlin. Improving noise. In "SIGGRAPH’02: Proceedings of the 29th Annual Conference on Computer Graphics and Interactive Techniques", pp. 681–682, San Antonio, Texas (2002).
[2] W. Burger and M.J. Burge. "Principles of Digital Image Processing - Advanced Methods" (Vol. 3). Undergraduate Topics in Computer Science. Springer-Verlag, London (2013).

Version:
2022/11/24
  • Constructor Details

    • PerlinNoiseGenerator2d

      public PerlinNoiseGenerator2d(double f_min, double f_max, double persistence, HashFunction hf)
      Constructor.
      Parameters:
      f_min - minimum frequency
      f_max - maximum frequency
      persistence - persistence
      hf - hash function
  • Method Details

    • getNoiseValue

      public double getNoiseValue(double x, double y)
      2D combined (multi-frequency) Perlin noise function. Returns the value of the combined Perlin noise function for the two-dimensional position (x,y).
      Parameters:
      x - interpolation position x
      y - interpolation position y
      Returns:
      the noise value for position (x,y)