Diamond squares algorithm
Appearance
The diamon squares algorithm is used to creat computer generated fractal landscape. The idea was first introduced by Gavin S. P. Miller who described it as flawd. The algorithm starts with a 2D grid then randomly generates terrain heigh from four seed values aranged in a grid of points so that the entire plane is coverd in squares. The diamond squares is a two step algorythm.
Steps
- Taking the four seed points that are arranged in a square calculate a new vale where the diagonals would cross by averaging the values of the four points and adding a random amount. There should now be a patter of diamonds across the network.
- Then do the same with the diagonals of the diamonds and you should have a patter of squares again.
after X ireterations take the valeus and translate them into hight demoninations.
sources
GameProgrammer.com[1]
This redirect has not been added to any content categories. Please help out by adding categories to it so that it can be listed with similar redirects. (April 2007) |