I have implemented the Diamond Square Algorithm as depicted in this site =>https://www.bluh.org/code-the-diamond-square-algorithm/
It is a way of generating height maps for computer graphics. These height maps can be used as textures or landscapes. 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.
For further details refer: https://en.wikipedia.org/wiki/Diamond-square_algorithm
Snapshots:
Here is the code.
No comments:
Post a Comment