ArticleslgStudy

computer science

Simplex noise

Simplex noise is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Simplex noise rather than just read about it. In short: Simplex noise is the result of an n-dimensional noise function comparable to Perlin noise ("classic" noise) but with fewer directional artifacts, in higher dimensions, and a lower computational overhead. Ken Perlin designed the algorithm in 2001 to address the limitations of his classic noise function, especially in higher dimensions.

Simplex noise — main illustration
Simplex noise — illustration

Key takeaways

  • Simplex noise belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Simplex noise to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Simplex noise from memory before moving on to harder problems.

Reference excerpt

Simplex noise is the result of an n-dimensional noise function comparable to Perlin noise ("classic" noise) but with fewer directional artifacts, in higher dimensions, and a lower computational overhead. Ken Perlin designed the algorithm in 2001 to address the limitations of his classic noise function, especially in higher dimensions. The advantages of simplex noise over Perlin noise:

Simplex noise has lower computational complexity and requires fewer multiplications. Simplex noise scales to higher dimensions (4D, 5D) with much less computational cost: the complexity is O(n2) for n dimensions instead of the O(n2n) of classic noise. Simplex noise has no noticeable directional artifacts (is visually isotropic), though noise generated for different dimensions is visually distinct (e.g. 2D noise has a different look than 2D slices of 3D noise, and it looks increasingly worse for higher dimensions). Simplex noise has a well-defined and continuous gradient (almost) everywhere that can be computed quite cheaply. Simplex noise is easy to implement in hardware. Whereas Perlin noise interpolates between the gradients at the surrounding hypergrid end points (i.e., northeast, northwest, southeast and southwest in 2D), simplex noise divides the space into simplices (i.e., n-dimensional triangles). This reduces the number of data points. While a hypercube in n dimensions has 2n corners, a simplex in n dimensions has only n+1 corners. The triangles are equilateral in 2D, but in higher dimensions the simplices are only approximately regular. For example, the tiling in the 3D case of the function is an orientation of the tetragonal disphenoid honeycomb. Simplex noise is useful for computer graphics applications, where noise is usually computed over 2, 3, 4, or possibly 5 dimensions. For higher dimensions, n-spheres around n-simplex corners are not densely enough packed, reducing the support of the function and making it zero in large portions of space.

Algorithm detail Simplex noise is most commonly implemented as a two-, three-, or four-dimensional function, but can be defined for any number of dimensions. An implementation typically involves four steps: coordinate skewing, simplicial subdivision, gradient selection, and kernel summation.

Coordinate skewing An input coordinate is transformed using the formula

x′=x+(x+y+⋯)⋅F, y′=y+(x+y+⋯)⋅F, ⋯, where

F=n+1−1n. This has the effect of placing the coordinate on an A*n lattice, which is essentially the vertex arrangement of a hypercubic honeycomb that has been squashed along its main diagonal until the distance between the points (0, 0, ..., 0) and (1, 1, ..., 1) becomes equal to the distance between the points (0, 0, ..., 0) and (1, 0, ..., 0). The resulting coordinate (x', y', ...) is then used in order to determine which skewed unit hypercube cell the input point lies in, (xb' = floor(x'), yb' = floor(y'), ...), and its internal coordinates (xi' = x' − xb', yi' = y' − yb', ...).

Simplicial subdivision Once the above is determined, the values of the internal coordinate (xi', yi', ...) are sorted in decreasing order, to determine which skewed Schläfli orthoscheme simplex the point lies in. Then the resulting simplex is composed of the vertices corresponding to an ordered edge traversal from (0, 0, ..., 0) to (1, 1, ..., 1), of which there are n! possibilities, each of which corresponds to a single permutation of the coordinate. In other words, start with the zero coordinate and successively add-ones starting in the value corresponding to the largest internal coordinate's value, ending with the smallest. For example, the point (0.4, 0.5, 0.3) would lie inside the simplex with vertices (0, 0, 0), (0, 1, 0), (1, 1, 0), (1, 1, 1). The yi' coordinate is the largest, so it is added first. It is then followed by the xi' coordinate, and finally zi'.

Gradient selection Each simplex vertex is added back to the skewed hypercube's base coordinate and hashed into a pseudo-random gradient direction. The hash can be implemented in numerous ways, though most often uses a permutation table or a bit manipulation scheme. Care should be taken in the selection of the set of gradients to include, to keep directional artifacts to a minimum.

Kernel summation The contribution from each of the n + 1 vertices of the simplex is factored in by a summation of radially symmetric kernels centered around each vertex. First, the unskewed coordinate of each of the vertices is determined using the inverse formula

x=x′−(x′+y′+⋯)⋅G, y=y′−(x′+y′+⋯)⋅G, ⋯, where

G=1−1/n+1n. This point is subtracted from the input coordinate to obtain the unskewed displacement vector. This unskewed displacement vector is used for two purposes:

To compute the extrapolated gradient value using a dot product. To determine d2, the squared distance to the point. From there, each vertex's summed kernel contribution is determined using the expression

(max⁡(0,r2−d2))4⋅(⟨Δx,Δy,…⟩⋅⟨grad⁡x,grad⁡y,…⟩), where r2 is usually set to either 0.5 or 0.6: the value 0.5 ensures no discontinuities, whereas 0.6 may increase visual quality in applications for which the discontinuities are not noticeable; 0.6 was used in Ken Perlin's original reference implementation.

Legal status Uses of implementations in 3D and higher for textured image synthesis were covered by U.S. patent 6,867,776, if the algorithm were implemented using the specific techniques described in any of the patent claims, which expired on January 8, 2022.

See also OpenSimplex noise Isotropy

References

External links Short technical article with source code by Stefan Gustavson (PDF) Perlin's animated "rubber sheet" simplex noise demo Another implementation of Simplex Noise in C++ (SimplexNoise1234)

Illustrations

Simplex noise: Simplex noise
Simplex noise

Worked examples

Example 1 — a first encounter with Simplex noise

Start with the simplest possible case. Write down what Simplex noise claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Simplex noise before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Simplex noise ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Simplex noise

In research
Simplex noise appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Simplex noise in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Simplex noise is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer graphic techniques, Noise (graphics), so understanding it makes those chapters shorter.
In everyday life
Look for Simplex noise outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Simplex noise” →

How to study Simplex noise in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Simplex noise means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Simplex noise out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Simplex noise in simple terms?

Simplex noise is the result of an n-dimensional noise function comparable to Perlin noise ("classic" noise) but with fewer directional artifacts, in higher dimensions, and a lower computational overhead. Ken Perlin designed the algorithm in 2001 to address the limitations of his classic noise funct…

Why does Simplex noise matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Simplex noise?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Simplex noise.

Tags

  • Computer graphic techniques
  • Noise (graphics)

Keep exploring