Skip to content

Map's generator in Python using Voronoi polygons and Lloyd relaxation

License

Notifications You must be signed in to change notification settings

mett29/Map-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Map Generator

Description

In this notebook I try to generate a map using Voronoi polygons (reference below).

To obtain more regular shapes I use a variant of the Lloyd relaxation algorithm: for every polygon I take all the vertices and calculate the centroids. In this case I applied this method once, but you can tweak the parameter times to have a bit different results.

I'm not very satisfied with the result, but I found some problems in doing this with Python, while I found a lot of projects written in other language maybe more suitable (C++, C# or Javascript, especially for textures and noise).

I'll probably try a more standard approach, like heightmaps generation and the Diamond-square algorithm. Don't know yet.

Reference

About

Map's generator in Python using Voronoi polygons and Lloyd relaxation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published