项目作者: mett29

项目描述 :
Map's generator in Python using Voronoi polygons and Lloyd relaxation
高级语言: Jupyter Notebook
项目地址: git://github.com/mett29/Map-Generator.git
创建时间: 2018-05-01T15:23:19Z
项目社区:https://github.com/mett29/Map-Generator

开源协议:MIT License

下载


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