I'm working on creating a procedurally generated fantasy-style map using the cells of a Voronoi diagram to determine terrain.
During the tectonic plate generation I realized that it's really important to have wrapping edges during generation to prevent plates from spreading against the edges of the map. On subsequent seeds, without border wrapping, the logic of the map goes out the window.
Tectonic Plates: No wrapping, plate borders indicated by black dots...
Part of determining the plates is identifying 70% of the world's area as "oceanic" and the other 30% as "continental".
Basically:
The borders of the map don't have to wrap as long as they can be thematically incorporated.
I've thought about adding predefined uniform points all around the edge and forcibly linking them to each other, but there has to be a better way. I've stripped out the border points because they don't link up well with their neighbors in the library I'm using.
My code repository Specifically, the makePoints()
function @line 236
I'm using Poisson Disk Sampling to generate the points. I'm programming in AS3 but I'm fine with answers in any programming language or pseudo code.
Question:
How do I wrap the Voronoi diagram so the cells at the bottom refer to the cells on the top and the cells on the left refer to the cells on the right (and vice versa)?
Edit: The desired result would be an image similar to this one of the real world's tectonic plates. See how the plates lap over the sides of the map? That's what I'm going for, though only East/West.