Perlin / Simplex Noise
First appeared 1983 · Ken Perlin — Ken Perlin (1983; "An Image Synthesizer", 1985; Simplex/Improving Noise, 2002). · timeline ↗
third-party / eponym Name — An eponym conferred by others: Perlin published the technique as "noise" (e.g. "An Image Synthesizer", 1985), not under his own name. The personal name "Perlin noise" was institutionally ratified by 1997, when the Academy of Motion Picture Arts and Sciences awarded him a Technical Achievement Award "for the development of Perlin Noise". The exact coiner and first attested use of the name are not established here (to be confirmed).
In one line A gradient-noise function that turns a regular lattice of pseudo-random gradients into a smooth, continuous, repeatable field. In generative art it is the workhorse for organic randomness — driving colour, position, density and motion without harsh jumps.
The code
The actual sketch behind the demo above — sandboxed and reproducible. This is the whole thing.
perlin-noise/index.html
const SEED = Math.floor(Math.random()*1e9);
function setup() {
noiseSeed(SEED); randomSeed(SEED);
const s = Math.min(windowWidth, windowHeight);
createCanvas(s, s);
pixelDensity(1);
noStroke();
// Quantised 2D Perlin noise → discrete colour bands (a stylised
// marching-square-ish look).
const FREQ = 0.008;
const RAMP = [
[12, 16, 40], [33, 50, 90], [90, 110, 130],
[170, 150, 130], [230, 210, 170], [255, 245, 230],
];
loadPixels();
for (let y = 0; y < height; y++) {
for (let x = 0; x < width; x++) {
const v = noise(x * FREQ, y * FREQ);
const band = Math.min(RAMP.length - 1, Math.floor(v * RAMP.length));
const [r, g, b] = RAMP[band];
const idx = 4 * (y * width + x);
pixels[idx] = r;
pixels[idx + 1] = g;
pixels[idx + 2] = b;
pixels[idx + 3] = 255;
}
}
updatePixels();
// Scatter contour points (not a connected polyline) wherever the noise
// is near a chosen iso-value — gives a stippled outline.
fill(255, 255, 255, 180);
const ISOS = [0.35, 0.5, 0.65];
const EPS = 0.004;
const STEP = 3;
for (let y = 0; y < height; y += STEP) {
for (let x = 0; x < width; x += STEP) {
const v = noise(x * FREQ, y * FREQ);
for (const iso of ISOS) {
if (Math.abs(v - iso) < EPS) {
circle(x, y, s / 600);
break;
}
}
}
}
}How it works
Assign a fixed pseudo-random gradient vector to each integer lattice point. To evaluate the noise at a point: 1. Find the surrounding lattice cell and the point's fractional position in it. 2. For each corner, take the dot product of that corner's gradient with the vector from the corner to the point. 3. Interpolate those corner values together using a smoothstep-style fade curve (6t⁵−15t⁴+10t³), which keeps first/second derivatives continuous. The result is smooth, band-limited noise. Summing several octaves (each at double frequency and half amplitude — "fractal Brownian motion") adds detail at multiple scales. Simplex noise replaces the square lattice with a simplex grid for fewer directional artifacts and cheaper scaling to higher dimensions.
Parameters
octaves: number — Number of noise layers summed (fractal Brownian motion); more octaves add finer detail.frequency: number — Base spatial frequency; higher values make the pattern vary more rapidly across the canvas.persistence: number — Amplitude falloff per octave (commonly 0.5); how much each finer octave contributes.lacunarity: number — Frequency multiplier per octave (commonly 2); the spacing of detail across octaves.seed: number — Initialises the permutation/gradient table so the field is reproducible.
Lineage
Frequently combined with
- Fragment Shader (GLSL) · 56 works
- HSL / Hue Cycle · 55 works
- Flow Field / Vector Field · 34 works
- Bezier / Catmull-Rom Splines · 27 works
- Marching Squares / Contours · 13 works
- Particle System · 13 works
- 3D Mesh / Geometry · 10 works
- Raymarching with SDFs · 10 works
- Plotter-style Hatching · 9 works
- Instanced Geometry · 8 works
- Glitch / Datamosh · 7 works
- Quadtree / Recursive Quad Split · 7 works
Works using this algorithm (177)
Last updated 2026-07-16