mett29 / Map-Generator

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:Jupyter Notebook 100.0%