ELI5: Explain Like I'm 5

Diamond-square algorithm

The diamond-square algorithm is a method of creating a detailed pattern of random numbers. When we say random numbers, that means that the numbers are chosen at random and the pattern they make is unique. The diamond-square algorithm can be used to generate landscapes, textures like marble and wood, and even patterns on the moon and stars!

To use this algorithm, you start off with one number in the center. Then, you draw four lines radiating out from the center, like the points of a diamond, and place a random number at each point. You then draw four lines connecting the points of the diamond together and place a random number at each of the four intersections, encompassing the diamond and forming a square. You keep repeating this process, covering the area with diamond and square patterns and adding random numbers at each point. In the end, you have created a random pattern of numbers all over the area.