-
6 points before relaxation
-
6 points after relaxation
-
30 point before relaxation
-
30 points after relaxation
-
100 points before relaxation
-
100 points after relaxation
-
100 point island
-
300 points before relaxation
-
300 points after relaxation
-
300 point island
-
1000 points before relaxation
-
1000 points after relaxation
-
1000 point island
Inspiration
Maps of fantasy lands in movies and books, as well as a similar project that I ran across
What it does
Randomly distributes seed points across a plane and builds a voronoi diagram from these points. Each pixel in a cell is closest to the seed of that cell than any other seed points. Finds centroid of each cell and makes that the new seed for the next iteration of the diagram. This relaxation allows for a more uniform shape of cells. Then it finds the most central cell and makes that the top of the mountain (white) and cells further from the center are populated with forests (green)
How I built it
Using python, pygame, and a lot of trial and error
Challenges I ran into
Manipulating the pixels using their coordinates and associating the large amount of pixels with each cell object
Accomplishments that I'm proud of
Writing my own algorithm for the Voronoi diagram.
What I learned
How to use pygame, the importance of good algorithms, importance of abstraction, manipulation of large data sets
What's next for Voronoi Map
Make the island more randomly shaped, increase efficiency of the algorithm, allow for water on the island
Log in or sign up for Devpost to join the conversation.