{"id":13617678,"url":"https://github.com/fogleman/PirateMap","last_synced_at":"2025-04-14T06:34:52.232Z","repository":{"id":55579249,"uuid":"47790761","full_name":"fogleman/PirateMap","owner":"fogleman","description":"Procedurally generate pirate treasure maps.","archived":false,"fork":false,"pushed_at":"2020-12-21T02:14:31.000Z","size":14,"stargazers_count":268,"open_issues_count":6,"forks_count":23,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-13T08:46:39.787Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fogleman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-10T22:20:29.000Z","updated_at":"2025-04-09T09:01:55.000Z","dependencies_parsed_at":"2022-08-15T03:31:15.854Z","dependency_job_id":null,"html_url":"https://github.com/fogleman/PirateMap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogleman%2FPirateMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogleman%2FPirateMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogleman%2FPirateMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fogleman%2FPirateMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fogleman","download_url":"https://codeload.github.com/fogleman/PirateMap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248835819,"owners_count":21169304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T20:01:45.903Z","updated_at":"2025-04-14T06:34:52.169Z","avatar_url":"https://github.com/fogleman.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Pirate Maps\n\nProcedurally generated pirate treasure maps. X marks the spot!\n\n![Example](http://i.imgur.com/9c0RMuj.png)\n\n### Dependencies\n\nI used several excellent third party libraries...\n\n- `cairo` for rendering\n- `colour` for color interpolation\n- `noise` for simplex noise\n- `Pillow` for saving debug images of noise layers\n- `pyhull` for delaunay triangulation\n- `Shapely` for all kinds of 2D geometry operations\n\n### How to Run\n\nThe script will generate several random maps and save them as PNG files.\n\n    git clone https://github.com/fogleman/PirateMap.git\n    cd PirateMap\n    pip install -r requirements.txt\n    python main.py\n\n### How it Works\n\nIt 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...\n\n- generate a layer of simplex noise with several octaves, with decreasing values as the edge of the image is approached\n- fill the screen with randomly positioned points evenly spaced using the poisson disc algorithm\n- filter the poisson points to those where the corresponding noise value is above some threshold\n- take these points and compute a \"concave\" hull or alpha shape with them\n\nShapely's `buffer` function is used heavily for padding or cleaning up shapes.\n\nI also wrote an `xkcdify` function to add some perturbations to some of the polygons, namely the different water color gradations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffogleman%2FPirateMap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffogleman%2FPirateMap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffogleman%2FPirateMap/lists"}