Fractal Terrain (2D): Diamond-Square Heightmap Generator
Top-down 2D fractal terrain lab: a genuine diamond-square midpoint-displacement algorithm builds a seeded heightmap from scratch, coloured by elevation into water, beach, grass, rock and snow bands. Tune roughness and grid detail and watch the same fractal maths that drives the 3D terrain sim, from directly above.
This top-down 2D companion to the 3D Procedural Terrain sim swaps fBm value-noise for a different classic fractal algorithm: diamond-square midpoint displacement. Starting from four random corner heights, alternating diamond and square averaging-plus-random-offset passes subdivide the grid down to single cells, with the random offset shrinking each pass by a roughness-controlled factor so the landscape stays coherent at every scale. The finished heightmap is normalised and rendered directly from above with elevation-band biome colouring (deep sea through snow peaks), a height-gradient view, and a slope-shading view, plus adjustable grid detail, roughness and sea level and a seeded regenerate button so any landscape can be reproduced exactly.
A top-down 2D fractal terrain generator built on a genuine diamond-square midpoint-displacement algorithm, coloured by elevation into water, beach, grass, rock and snow bands with adjustable roughness, grid detail and sea level.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install