Fractal landscape generation with diamond-square algorithm
This is a small MATLAB function to generate a fractal landscape by using diamon-square algorithm. The algorithm is actually very old but I learned it on the Paul Martz's "Generating Random Fractal Terrain" page (http://www.gameprogrammer.com/fractal.html) He also gives a C program but I was too lazy to compile it, install developer tools, compilers etc. So I decided to write a simplified version. The features are:
1. It is a single MATLAB file: fractal_landscape.m
2. If you run it, you will see a small animation of diamond-square algorithm.
3. If want to increase the resolution, just increase the maxiter parameter to 8 or 9.
4. I believe the comments inside the codes are very usefull to understand the algorithm.
5. It also create a POVRAY output of the landscape so that you can render it POVRAY if you want to.
Have fun
Cita come
Huseyin Kaya (2025). Fractal landscape generation with diamond-square algorithm (https://it.mathworks.com/matlabcentral/fileexchange/44714-fractal-landscape-generation-with-diamond-square-algorithm), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- Mathematics and Optimization > Mapping Toolbox > Data Analysis >
- Radar > Mapping Toolbox > Data Analysis >
- MATLAB > Mathematics > Fractals >
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
| Versione | Pubblicato | Note della release | |
|---|---|---|---|
| 1.0.0.0 |
