All Projects → henrikglass → erodr

henrikglass / erodr

Licence: MIT license
An implementation of Hans Theobald Beyer's algorithm for simulated hydraulic erosion

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to erodr

dea-coastlines
Extracting tidally-constrained annual shorelines and robust rates of coastal change from freely available Earth observation data at continental scale
Stars: ✭ 24 (-35.14%)
Mutual labels:  erosion
TinyErode
A portable C++ library for simulating hydraulic erosion.
Stars: ✭ 39 (+5.41%)
Mutual labels:  erosion
SimpleErosion
Simple C++ implementatoin of particle-based hydraulic erosion on a square grid
Stars: ✭ 64 (+72.97%)
Mutual labels:  erosion
Digital-Image-Processing
This repository includes all Basic Algorithms related to image Processing, these are almost without Build-in Functions
Stars: ✭ 18 (-51.35%)
Mutual labels:  erosion
R-CNN LIGHT
Regional-Convolution Neural Network for blink detection based on contouring.
Stars: ✭ 66 (+78.38%)
Mutual labels:  erosion
SoilMachine
Advanced, modular, coupled geomorpohology simulator for real-time procedural terrain generation.
Stars: ✭ 166 (+348.65%)
Mutual labels:  erosion

Erodr

Erodr is an implementation of Hans Theobald Beyer's algorithm for simulated hydraulic erosion of landscapes. The algorithm is described in detail in his his thesis Implementation of a method for hydraulic erosion which can be found here. Below is the before & after of a 512x512 landscape eroded using Erodr.

alt text

Building

To build, simply run make in the root of the repository. I recommend to play around a bit with the optimization flags under CFLAGS in the makefile. On some machines "-O1" produced a faster result than both "-O2" and "-O3". Enabling "-march=native" may improve performance on some machines.

Usage

Usage: erodr -f file [-options]
Simulation options:
    -n ##             Number of particles to simulate (default: 70'000)
    -t ##             Maximum lifetime of a particle (default: 30)
    -g ##             Gravitational constant (default: 4)
    -r ##             Particle erosion radius (default: 2)
    -e ##             Particle enertia coefficient (default: 0.1)
    -c ##             Particle capacity coefficient (default: 10)
    -v ##             Particle evaporation rate (default: 0.1)
    -s ##             Particle erosion coefficient (default: 0.1)
    -d ##             Particle deposition coefficient (default: 1.0)
    -m ##             Minimum slope (default: 0.0001)
Other Options:
    -o <file>         Place the output into <file>
    -a                Output is ASCII encoded

For input and output, Erodr so far only deals with grayscale heightmaps in Netpbm grayscale image format, i.e. *.pgm files. With no other specified options except the input file (with -f), Erodr will run a simulation with the default parameters (listed above) and output the result to output.pgm.

Contribution

This project was written entirely for fun. If anyone wants to contribute feel free to create a pull request.

Keep in mind

The software is provided "as is".

works badge

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].