Diamond-square algorithm

Plasma fractal
Animated plasma fractal with color cycling

The diamond-square algorithm is a method for generating heightmaps for computer graphics. It is a slightly better algorithm than the three-dimensional implementation of the midpoint displacement algorithm, which produces two-dimensional landscapes. It is also known as the random midpoint displacement fractal, the cloud fractal or the plasma fractal, because of the plasma effect produced when applied.

The idea was first introduced by Fournier, Fussell and Carpenter at SIGGRAPH in 1982.[1]

The diamond-square algorithm starts with a two-dimensional grid, then randomly generates terrain height from four seed values arranged in a grid of points so that the entire plane is covered in squares.

  1. ^ Fournier, Alain; Fussell, Don; Carpenter, Loren (June 1982). "Computer rendering of stochastic models". Communications of the ACM. 25 (6): 371–384. doi:10.1145/358523.358553. ISSN 0001-0782.