Skip to content

Ivruix/WGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WGen

This is an implementation of algorithm similar to the diamond-square algorithm, that can generate natural-looking heightmaps.

Installation

You can download this repo and then install required libraries by running this command in the project directory:

pip3 install -r requirements.txt

Usage

To generate new image, run this command in project directory:

python generate.py [iterations] [smoothness]
  • iterations - number of iterations. After each iteration image size is roughly doubled.
  • smoothness - smoothing factor. The bigger it is, the smoother the end picture.

After running this command, the generated.png file should appear in the working directory.

Examples

  • python generate.py 10 1.5 - generates 1025x1025 image.

  • python generate.py 10 10

  • python generate.py 10 0.9

License

MIT

About

Heightmap generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages