Diamond-square algorithm

Diamond -square algorithm is a method that is used in computer graphics to generate height fields. It provides a two -dimensional generalization of the midpoint displacement dar. The algorithm was first presented in 1982 by Founier, Fussell and Carpenter at SIGGRAPH 1982. The name goes back to Gavin S. P. Miller.

The basic idea

Starting point for the generation of a fractal landscape on the basis of Diamond -square algorithm is a square. Each corner of the square is assigned a height value. The algorithm divides the square recursively into smaller squares, the height value of the center point is defined as the average of the four corner points, plus a random offset. Analogously to the altitude value of the median line of a square, is defined as the mean value of the four surrounding points horizontally, plus a random offset. The shift is normally distributed with a mean of 0 and increases with the size of the rectangles from. The center points and Seitenhalbierende form the cornerstones of the new rectangles. Exception to the rule for the generation of the new points are the four outer sides of the original rectangle, which are respectively generated by means of the one-dimensional offset.

Criticism

Gavin SP Miller has the Diamond -square algorithm criticized as, in contrast to the one presented by him Square -square algorithm, resulting in noticeable artifacts in the generated landscape.

Fractal landscapes in general are being criticized, since although they provide a good approximation for mountain ranges, landscapes, however - you put them on his head - are statistically identical. In reality, however, be stored for example in sediments from hollows, which flatten them. Musgrave, inter alia, the piston and Mace developed, including erosion effects, a development of fractal scenery, which is able to create environments which are under much closer to reality.

235253
de