I am currently working on the creation of a fantasy-style map that is procedurally generated using the cells of a Voronoi diagram to determine different terrains.
While working on the tectonic plate generation, I came to the realization that having wrapping edges during the generation process is crucial in order to prevent the plates from spreading against the map boundaries. Without border wrapping on subsequent seeds, the logic of the map gets completely skewed.
Tectonic Plates: No wrapping, plate borders indicated by black dots...
Part of the plate identification process involves designating 70% of the map as "oceanic" and the remaining 30% as "continental".
Essentially:
It is not necessary for the map borders to wrap as long as they can be thematically integrated.
I have considered adding predefined uniform points around the edge and connecting them forcefully, but I am on the lookout for a better solution. I have removed the border points as they do not align well with their neighboring points in the library that I am utilizing.
Library being used
My code repository Specifically, the makePoints()
function @line 236
I am employing Poisson Disk Sampling for the point generation. Although I am coding in AS3, I am open to receiving answers in any programming language or pseudo code.
Question:
How can I wrap the Voronoi diagram so that the cells at the bottom correspond to the cells at the top, and the cells on the left relate to the cells on the right (and vice versa)?
Edit: The desired outcome would be an image resembling the real world's tectonic plates. Notice how the plates overlap the sides of the map? That is the effect I am aiming for, specifically East/West.