tergen1d(level) is a random terrain generator in 1 dimension. It begins by dividing a line segement between (0,0) and (1,0). Next, it adds a random value between (-1,1) to the y-value of the dividing point at x=0.5. The two new line segments are then split in the same way but the range of the new y-value addition is decreased by half (-0.5,0.5). This is repeated level times.
Cite As
Andrew Wheatley (2024). tergen1d(level) (https://www.mathworks.com/matlabcentral/fileexchange/52263-tergen1d-level), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2014a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
- Mathematics and Optimization > Mapping Toolbox > Map Display >
- Radar > Mapping Toolbox > Map Display >
- Mathematics and Optimization > Mapping Toolbox > Data Analysis >
- Radar > Mapping Toolbox > Data Analysis >
Find more on Map Display in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |