File Exchange

image thumbnail

Automatic Terrain Generation

version (5.02 MB) by Tucker McClure
A set a tools for generating artificial terrain and other rough phenomena mapped over a 2D surface.


Updated 01 Sep 2016

View Version History

View License

This set includes three tools for generating approximately realistic-looking terrain and other phenomena that might be mapped across a two dimensional surface, such as population density, corrosion, air pollution, or wildlife distribution. The methods, variations on proposals by Benoît Mandelbrot, are very simple, and yet result in significant, "life-like" complexity.
A document is included that describes how the methods work and how they can be used for various purposes. From MATLAB, open readme.html or navigate to the HTML subdirectory.
Other names for these types of techniques include midpoint displacement, fractional Brownian motion, and fractal landscape.

Cite As

Tucker McClure (2021). Automatic Terrain Generation (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (10)

David Angulo-Garcia

Awesome contribution. Exactly what I was looking for.

Antonio Aguirre

Slav Demin

Nice work. A flat surface appears here and there but otherwise the terrain looks incredibly realistic.

xiang WANG

I want to know how I can use it in my quadruped simulation. Thank you

Tucker McClure

Hi Josh. I would think so, or at least that it would be easy to convert the DEM to the a regularly-spaced square mesh representing height and then convert back. I haven't worked with DTED and can't speak to that one.


Can your generate_terrain_colors.m be used or modified to work over DTED or DEM data with Z instead of (hm)

Byron Hernandez

Hello, Can I use this terrain in a vreal simulation?

Lorenzo Aldrighetti



MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!