Perlin Noise - Algorithm

Algorithm

Perlin noise is most commonly implemented as a two-, three- or four-dimensional function, but can be defined for any number of dimensions.

Define an n-dimensional grid. Each grid coordinate stores a gradient of unit length in n dimensions. To sample, determine which grid cell you're in, and then compute the n-dimensional vectors from the sample location to each grid coordinate of the cell. For each grid coordinate, calculate the dot products of the corresponding distance and gradient vectors. Finally, interpolate these dot products using a function that has zero first derivative (and possibly also second derivative) at both endpoints.

In 2001, Ken Perlin created simplex noise, which is similar to but alleviates some problems with Perlin "classic noise", among them, computational complexity.

Read more about this topic:  Perlin Noise