Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tadateruki/fastlem-random-terrain
A random terrain generator based on fastlem
https://github.com/tadateruki/fastlem-random-terrain
Last synced: 19 days ago
JSON representation
A random terrain generator based on fastlem
- Host: GitHub
- URL: https://github.com/tadateruki/fastlem-random-terrain
- Owner: TadaTeruki
- License: mpl-2.0
- Created: 2024-02-02T12:48:01.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-02-08T13:54:10.000Z (9 months ago)
- Last Synced: 2024-02-08T14:46:18.060Z (9 months ago)
- Language: Rust
- Size: 720 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fastlem-random-terrain
A simple random terrain generator using [fastlem](https://crates.io/crates/fastlem).
## build & run
### Using cargo
```
$ cargo build --release
```The binary is generated in `target/release/fastlem-random-terrain`. If you want to move it into current directory, run the following command.
```
$ mv target/release/fastlem-random-terrain .
```### Using docker
```
$ docker build -t fastlem-random-terrain .
```The image is generated as `fastlem-random-terrain`. To run:
```
$ docker run -it fastlem-random-terrain fastlem-random-terrain
```Command line options can be passed as follows:
```
$ docker run -it fastlem-random-terrain fastlem-random-terrain --help
```## Examples
```
$ fastlem-random-terrain --image-size 300:300
```
![terrain](https://github.com/TadaTeruki/fastlem-random-terrain/assets/69315285/d0108ec7-bed7-4dd2-8b5f-48aa4805979e)```
$ fastlem-random-terrain --colormap-json-filename default_color.json --image-size 300:300
```
![terrain](https://github.com/TadaTeruki/fastlem-random-terrain/assets/69315285/26b82599-01e6-4a8c-80a1-0e9c936d19e4)```
$ fastlem-random-terrain --colormap-json-filename default_color.json --image-size 300:300 --seed 5000
```
![terrain](https://github.com/TadaTeruki/fastlem-random-terrain/assets/69315285/565bb330-dd3d-4976-8c72-acf3816e499e)## Options
```
$ fastlem-random-terrain --help
``````
Usage: fastlem-random-terrain [OPTIONS]Options:
-b, --bound
Width and height (width:height) of the bound [default: 100.0:100.0]
-c, --colormap-json-filename
JSON file of the colormap. If not specified, the grayscale colormap is used [default: ]
-s, --seed
Seed of the noise generator [default: 0]
-i, --image-size
Width and height (width:height) of the image. If -1 is specified, the aspect ratio is the same as the bound [default: 1024:-1]
-o, --output-filename
File name of the output image [default: terrain]
-f, --output-format
Output format of the terrain data. Supported formats: png, jpeg, csv [default: png]
-p, --particle-num
Number of particles. The larger the value, the more the quality of the terrain is improved [default: 50000]
--erodibility-distribution-power
[advanced] Power of the erodibility distribution. The larger the value, the more the erodibility is concentrated on the lower side [default: 4.0]
--fault-scale
[advanced] Scale of the fault. The larger the value, the more virtual faults effect the terrain [default: 35.0]
--land-ratio
[advanced] Approximate ratio of the land area (0.0-1.0) [default: 0.6]
--convex-hull-is-always-outlet
[advanced] If true, the edge points of the terrain are always outlet and its elevation is fixed to 0
--global-max-slope
[advanced] Maximum slope angle of the terrain. The larger the value, the more the terrain is rough (radian, max: Pi/2) [default: 1.57]
-h, --help
Print help
```## License
MPL-2.0