Plate tectonics simulation library
Project description
PyPlatec - Python Bindings for Plate Tectonics Library
Python bindings for the plate-tectonics library - a C++ library to simulate plate tectonics.
Installation
pip install PyPlatec
Requirements
- Python 3.9 or higher
- No compiler needed when installing from PyPI (pre-built wheels available)
Quick Start
import platec
# Create a simulation with keyword arguments (recommended)
p = platec.create(
seed=3,
width=512,
height=512,
sea_level=0.65,
erosion_period=60,
folding_ratio=0.02,
aggr_overlap_abs=1000000,
aggr_overlap_rel=0.33,
cycle_count=2,
num_plates=10
)
# Run the simulation
while platec.is_finished(p) == 0:
platec.step(p)
# Get the heightmap
hm = platec.get_heightmap(p)
# Clean up
platec.destroy(p)
API Reference
platec.create()
Important: All 10 parameters are required. You can use either positional or keyword arguments.
platec.create(seed, width, height, sea_level, erosion_period, folding_ratio,
aggr_overlap_abs, aggr_overlap_rel, cycle_count, num_plates)
Parameters:
seed(int): Random seed for the simulationwidth(int): Map width in pixelsheight(int): Map height in pixelssea_level(float): Sea level (0.0-1.0, typically 0.65)erosion_period(int): Erosion period (typically 60)folding_ratio(float): Folding ratio (typically 0.02)aggr_overlap_abs(int): Absolute overlap threshold (typically 1000000)aggr_overlap_rel(float): Relative overlap threshold (typically 0.33)cycle_count(int): Number of cycles (typically 2)num_plates(int): Number of plates (typically 10)
Example with custom parameters:
import platec
# Keyword arguments make the code more readable
p = platec.create(
seed=3,
width=1000,
height=800,
sea_level=0.65,
erosion_period=60,
folding_ratio=0.02,
aggr_overlap_abs=1000000,
aggr_overlap_rel=0.33,
cycle_count=2,
num_plates=10
)
# Or use positional arguments if preferred
p = platec.create(3, 1000, 800, 0.65, 60, 0.02, 1000000, 0.33, 2, 10)
# Run simulation...
Building from Source
python setup.py build
python setup.py install
For development:
pip install -e .
For Maintainers: Creating a Release
See RELEASE.md for detailed instructions on:
- Building wheels with GitHub Actions
- Downloading built artifacts
- Publishing releases to PyPI with twine
- Testing with TestPyPI
- Building wheels for multiple platforms
Quick release process:
# 1. Update version in setup.py and pyproject.toml
# 2. Commit changes
git commit -am "Bump version to 1.4.2"
# 3. Create and push a tag
git tag v1.4.2
git push origin master
git push origin v1.4.2
# 4. Wait for GitHub Actions to build all wheels
# 5. Download artifacts from GitHub Release or Actions tab
# 6. Upload to PyPI: twine upload *.whl *.tar.gz
License
LGPL-3.0-or-later - See LICENSE file in the repository root.
Links
- GitHub Repository
- WorldEngine - A world generator using this library
- Original Project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyplatec-1.4.3.tar.gz.
File metadata
- Download URL: pyplatec-1.4.3.tar.gz
- Upload date:
- Size: 55.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d742526d0b867489fa61a937a53ae0504b9c2e6f1087fdfd0f4969c4ece78d8
|
|
| MD5 |
aa0464debdf965dfd74e851a1b9e846b
|
|
| BLAKE2b-256 |
80edd868d0868cafa0d0f116f63862f6b9bf15ec044d144831014442994a95f1
|
File details
Details for the file pyplatec-1.4.3-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 54.1 kB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e9ce80ee54edb96468e6b1ba7b92983ff28fd9ed51a711bee472e10e39832bc
|
|
| MD5 |
0e6504a2eb6d684e511074b02fe49ab7
|
|
| BLAKE2b-256 |
07807bbcd9150f05e87519923e024082cb3f189edf78bff33bfa5e49f3d3133c
|
File details
Details for the file pyplatec-1.4.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 621.3 kB
- Tags: CPython 3.14, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8ee9804f10c96124a55001657dbf92439dbf0620954a69c89f9e6529be09c62
|
|
| MD5 |
cc36c6194aa428940ed55be7cd79d7d6
|
|
| BLAKE2b-256 |
517e1358775092052ec58ed36f4ec7aca02d78b38eea2a5515f469bab5339acf
|
File details
Details for the file pyplatec-1.4.3-cp314-cp314-macosx_10_15_universal2.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp314-cp314-macosx_10_15_universal2.whl
- Upload date:
- Size: 131.2 kB
- Tags: CPython 3.14, macOS 10.15+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bb0ce2782aae72f6f1972e5684c946c62dbd0ddc6190cebfa7ccd0bab9f2b55
|
|
| MD5 |
5aca1ec98f0dcb9aea1c53f512f0e119
|
|
| BLAKE2b-256 |
706660467ee3865125510ea5bf76cd134d3fa51652bdd69293a6eb038aea8028
|
File details
Details for the file pyplatec-1.4.3-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 52.8 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4ad2b38912b3a004c9d8436d88b514b0086e2684cac3aa6f0f7e0660de24d52
|
|
| MD5 |
240d6567d8b3da711d9eeb2a6e554471
|
|
| BLAKE2b-256 |
8e6dd2b4ac21256023e0cf79782eb0ea1c76ab387534de1b35a9dc1c0b227969
|
File details
Details for the file pyplatec-1.4.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 621.3 kB
- Tags: CPython 3.13, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df3b50c19eff9d8d323f3d2d5ce11de22f4af98db5c96abbe60c48b57f3a3058
|
|
| MD5 |
4bad89e3cd98b01a3e2980f91595f384
|
|
| BLAKE2b-256 |
37f5363b9233c1373b4cfdbfbb5047881ecaf4cd8d9ac269db0ad277d1219284
|
File details
Details for the file pyplatec-1.4.3-cp313-cp313-macosx_10_13_universal2.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp313-cp313-macosx_10_13_universal2.whl
- Upload date:
- Size: 131.2 kB
- Tags: CPython 3.13, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b441010f501179feadbc9bb376fa45e4fcde66d18dc6abfd65ddaa6c525713e4
|
|
| MD5 |
fe3df62af2bfa20cedbf80717e6216a4
|
|
| BLAKE2b-256 |
9308d1b060430c3128245cf1e55278eb13e97512bda65affd3193e0c0940b9f0
|
File details
Details for the file pyplatec-1.4.3-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 52.8 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4841063d61e2786c274690d427f0712b4a10c3a6a894a6a13734d5312acfcd5a
|
|
| MD5 |
bd46df4487f1f6874c5cc3c3ce2f1468
|
|
| BLAKE2b-256 |
4cba3cdcd67020e4e8da2c8ab796370856abc0976c0c4613d984c649fda3fa2f
|
File details
Details for the file pyplatec-1.4.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 621.4 kB
- Tags: CPython 3.12, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b08bcbd6dffbfc8322b58aab5aeb4623fb4f5a0d511749bcc547d7037e76726
|
|
| MD5 |
51b2b07ac469c0b9ee7027d295f08f09
|
|
| BLAKE2b-256 |
2f6c7442712d5328c9031d1f6fe56f331e4c67bc344e7bc27aeb22387f35982d
|
File details
Details for the file pyplatec-1.4.3-cp312-cp312-macosx_10_13_universal2.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp312-cp312-macosx_10_13_universal2.whl
- Upload date:
- Size: 131.2 kB
- Tags: CPython 3.12, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c369ff03b9b1123626c9ee66c607a673cbfe90cd54b7de8c3e07270109a782c
|
|
| MD5 |
8c925f82a56592f7db2a03421ac53a16
|
|
| BLAKE2b-256 |
2eb56c1a38f79c5a4a8687cef10cb5039bef8562d7d2963043f57d7ac02f6f63
|
File details
Details for the file pyplatec-1.4.3-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 52.7 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab49f49edff5da1b3a1ee96affcb89c777735d35cfd873cf453874f9bf32bc32
|
|
| MD5 |
17ddea593d6099124c913dbf2acb7ed3
|
|
| BLAKE2b-256 |
d391b6791fcff86caccf1bb892ddfcbe310dff0f29b7e386e62c365fb02bc269
|
File details
Details for the file pyplatec-1.4.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 621.3 kB
- Tags: CPython 3.11, manylinux: glibc 2.24+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34f502727201dc0279337a29d51c463a4ae8e2559bc666179dae0b8eb05b1a12
|
|
| MD5 |
8141ffe6237171e8e0a5dc7c5200c023
|
|
| BLAKE2b-256 |
4d992b3bc9eafcfd4059afdb5759b289d03ac61e0f7b928936de7cdf7dcb9b30
|
File details
Details for the file pyplatec-1.4.3-cp311-cp311-macosx_10_9_universal2.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp311-cp311-macosx_10_9_universal2.whl
- Upload date:
- Size: 131.1 kB
- Tags: CPython 3.11, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
633a56815c329063ad178cb13988ffcd2433291daf7a273c358e1e5c7721133b
|
|
| MD5 |
2cc00085f54a259250c892e2705ad4dc
|
|
| BLAKE2b-256 |
3a7dd1152943ae7d5963d6c299c19485fe4c29882dce8c8b3de7eea6c1e507e1
|
File details
Details for the file pyplatec-1.4.3-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 52.7 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
244e84670e1d38e8a8eea93db1389ff516a85328314de5614b4c5244ae13f2b5
|
|
| MD5 |
599b930c26d4dff3881a2e80a311125b
|
|
| BLAKE2b-256 |
78691092a9bcc8abfbdd9f17822e3a38308df206d89ffe9d3df117cfa67c45dc
|
File details
Details for the file pyplatec-1.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 653.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3e1f13d0481811232638a4db28f15c8d9d7aa89a57ec6fd76669b0001c2221d
|
|
| MD5 |
a88bf7f338c0ab84c2af0c0dc8f7a0b2
|
|
| BLAKE2b-256 |
dc2d045b3acb71b35acf8400ab9c409ed1d6cdae470b43278fb75b467b362189
|
File details
Details for the file pyplatec-1.4.3-cp310-cp310-macosx_10_9_universal2.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp310-cp310-macosx_10_9_universal2.whl
- Upload date:
- Size: 131.1 kB
- Tags: CPython 3.10, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f48329bb088d5be31be84246e7e8fbd40a61b694df1c38da57acba8daaff34a
|
|
| MD5 |
e633850d199d93c700aced4e61a48542
|
|
| BLAKE2b-256 |
c5d4bba514907374992eab1cd08760e45f5d62c77ef18ae7fd32769fdf7ee765
|
File details
Details for the file pyplatec-1.4.3-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 52.7 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d6b45a6414bd4389819366607ca292673ab4dfea9945e9f714421f467479aea
|
|
| MD5 |
c240e01685ce451711077bb2030abc6a
|
|
| BLAKE2b-256 |
2bd02938dc0a92b16e899735e706e0d0c18b5d25b30555e06a7d3765a9d7733d
|
File details
Details for the file pyplatec-1.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 652.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cafa31380185514be2429cf2956a74d77a65d01f3169a30f4141d70299d17d40
|
|
| MD5 |
4bba0f7f3e81a7dbd956a607d2fb3db5
|
|
| BLAKE2b-256 |
de9e020b0bd04eb2c89a88363488a36796af8a64e12bb84feb51906a89ab219b
|
File details
Details for the file pyplatec-1.4.3-cp39-cp39-macosx_10_9_universal2.whl.
File metadata
- Download URL: pyplatec-1.4.3-cp39-cp39-macosx_10_9_universal2.whl
- Upload date:
- Size: 131.1 kB
- Tags: CPython 3.9, macOS 10.9+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa2a65acb46efe4cc1b58e7de8afe7efc700ad1bb0d6687eea8ca1049165fb2e
|
|
| MD5 |
f7282b969046bd4cd437b9d92ac5aed1
|
|
| BLAKE2b-256 |
013ed0771fb22eb58fca64f33980945857cb6d633dddc309fcb599683337ff07
|