Interactive demo

Simplex Noise

Ken Perlin presented simplex noise in 2001 as the successor of his Perlin noise. It uses a grid of triangles instead of squares, so every point depends on only three corners, and the grid hardly shows.

Your browser does not support the HTML5 canvas tag.

Move the pointer over the image: the highlighted triangle contains the point, and the lines show what each of its three corners adds to the noise value.

Controls

Under the pointer

Corner 1
0.00
Corner 2
0.00
Corner 3
0.00
Noise value
0.00

Legend

  • Grid point and its gradient
  • Corner raises the value
  • Corner lowers the value

1. A skewed grid

The plane is cut into equilateral triangles. To find the triangle of a point, its coordinates are skewed so that the triangles become halves of squares. Then the point lies in a square cell, and one comparison (x > y) picks the half.

2. Three contributions

As in Perlin noise, every corner has a random gradient. Its contribution is the dot product of the gradient with the vector to the point, weighted by (0.5 − d²)⁴. Beyond a distance of about 0.71 the weight is zero.

3. Why it is better

Instead of blending four corners, simplex noise simply adds three contributions that fade out on their own. That is cheaper, especially in higher dimensions (n + 1 corners instead of 2ⁿ), and shows fewer artifacts along the grid axes.

Credits

  • The implementation follows Simplex noise demystified by Stefan Gustavson (2005), which explains Ken Perlin's simplex noise from 2001.