File size: 1,264 Bytes
545f1ba
 
 
 
 
 
 
 
 
 
 
 
 
bf74b80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545f1ba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
---
title: MapGenerator
emoji: πŸŒ–
colorFrom: purple
colorTo: green
sdk: gradio
sdk_version: 5.5.0
app_file: app.py
pinned: false
license: mit
short_description: Generate procedural geographic maps from random fields
---

# MapGenerator

Generate procedural geographic maps from random fields.

## Map generation

The process of map generation is as follows:

1. Generate a random field, choosing from the list of available random fields
2. Normalize the field between 0 and 1
3. Smooth the field with a gaussian filter
4. Retain only the mainland above a certain threshold

## Random fields

The available random fields are:

- `gauss`: Random gaussian field, with a given power spectrum, computed using the package [powerbox](https://powerbox.readthedocs.io/en/latest/index.html)
- `perlin`: Perlin noise, computed using the package [noise](https://pypi.org/project/noise/)
- `warped_perlin`: Perlin noise with domain warping, computed using the package [noise](https://pypi.org/project/noise/)
- `cos`: Sinusoidal noise (to be improved)
- `fbm`: Fractional Brownian Field

**See complete source code [here](https://github.com/PabloVD/MapGenerator/tree/master)**

Check out the configuration reference at https://huggingface.co./docs/hub/spaces-config-reference