|Number of watchers on Github||143|
|Number of open issues||4|
|Average time to merge a PR||about 5 hours|
|Open pull requests||3+|
|Closed pull requests||1+|
|Last commit||over 3 years ago|
|Repo Created||almost 5 years ago|
|Repo Last Updated||over 2 years ago|
|Organization / Author||fogleman|
|Do you use PirateMap? Leave a review!|
|View open issues (4)|
|View PirateMap activity|
|View on github|
|Book a Mock Interview With Me (Silicon Valley Engineering Leader, 100s of interviews conducted)|
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Procedurally generated pirate treasure maps. X marks the spot!
I used several excellent third party libraries...
colourfor color interpolation
noisefor simplex noise
Pillowfor saving debug images of noise layers
pyhullfor delaunay triangulation
Shapelyfor all kinds of 2D geometry operations
The script will generate several random maps and save them as PNG files.
git clone https://github.com/fogleman/PirateMap.git cd PirateMap pip install -r requirements.txt python main.py
It took me a while to decide on an approach for generating the land masses. I didn't want to just generate some simplex noise, threshold it and render it. I wanted to actually compute a polygonal shape that I could do further operations on. So here's how that works...
concavehull or alpha shape with them
buffer function is used heavily for padding or cleaning up shapes.
I also wrote an
xkcdify function to add some perturbations to some of the polygons, namely the different water color gradations.