A package for simulation and visualization of strange attractors
Project description
attractors
in chaos, emerges beauty
A package for simulation and visualization of strange attractors.
Core Features
- A curated collection of 20+ strange attractors including classics and rare gems
- High-performance numerical solving using Numba-accelerated Runge-Kutta solvers
- Stunning visualizations with various themes and color mappings
- Modular design that welcomes extensions and experimentation
Read the full creator's note here
[!NOTE] The version 2.x of attractors is a complete rewrite and is not backward compatible with the previous versions. Especially the API has been completely revamped, and the CLI support has been removed (though it might be added back in the future). If you are looking for the older version, you can find it in the v1-legacy branch and its related documentation
Setup
For end user, it is just a pip installation
pip install attractors
Requirements: Python 3.11+ with NumPy 2.2+, Numba 0.63+, and Matplotlib 3.10+
Note that attractors depends on numba, so the system must be able to compile it. If any issues arise, look at numba installation docs.
Basic Usage
In v2.x of attractors, registries are introduced to facilitate easier creation and usage of existing as well as new, custom systems solvers and themes. The following simple script demonstrates that well:
from attractors import SystemRegistry, SolverRegistry, integrate_system
import matplotlib.pyplot as plt
from attractors.visualizers import StaticPlotter
from attractors.themes import ThemeManager
# Get system and solver from registry
system = SystemRegistry.get("lorenz") # Using default parameters
solver = SolverRegistry.get("rk4") # 4th order Runge-Kutta
# Generate trajectory
trajectory, time = integrate_system(system, solver, steps=10000, dt=0.01)
# Create visualization
theme = ThemeManager.get("nord") # Using Nord color theme
plotter = StaticPlotter(system, theme)
plotter.visualize(trajectory)
plt.show()
Check out some examples for more inspiration. The banner.py for example was the code used to generate the README banner!
For a deeper dive into the package's capabilities, explore the complete documentation.
License
In spirit of open source code - MIT License
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 Distribution
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 attractors-2.0.1.tar.gz.
File metadata
- Download URL: attractors-2.0.1.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73cd3101326a013a12f5e1837fe325547bf0a8027286ecefc48eba8b9332413e
|
|
| MD5 |
c0319a4a5fec895656199ebc97d3c9c0
|
|
| BLAKE2b-256 |
e5cdacc8257cfde047ca239f0e0187c0cdde86870d7d0290a014a9f831540fb3
|
Provenance
The following attestation bundles were made for attractors-2.0.1.tar.gz:
Publisher:
cd.yml on vdesmond/attractors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
attractors-2.0.1.tar.gz -
Subject digest:
73cd3101326a013a12f5e1837fe325547bf0a8027286ecefc48eba8b9332413e - Sigstore transparency entry: 928313247
- Sigstore integration time:
-
Permalink:
vdesmond/attractors@c85dddcbfd8c967aa3e25596c82c7b6fab44e960 -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/vdesmond
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@c85dddcbfd8c967aa3e25596c82c7b6fab44e960 -
Trigger Event:
push
-
Statement type:
File details
Details for the file attractors-2.0.1-py3-none-any.whl.
File metadata
- Download URL: attractors-2.0.1-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f76d47a60c98115afb658f1e8977ce4bac1d529b5b4adcd9b6041866aabd3f7
|
|
| MD5 |
65a0f9130ddee8ad87071bcbb52b79af
|
|
| BLAKE2b-256 |
a9ebadc0143c0531fc2c747297f48c46b352d8ff5b40169cf1fe6bf8e4b2da5f
|
Provenance
The following attestation bundles were made for attractors-2.0.1-py3-none-any.whl:
Publisher:
cd.yml on vdesmond/attractors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
attractors-2.0.1-py3-none-any.whl -
Subject digest:
1f76d47a60c98115afb658f1e8977ce4bac1d529b5b4adcd9b6041866aabd3f7 - Sigstore transparency entry: 928313250
- Sigstore integration time:
-
Permalink:
vdesmond/attractors@c85dddcbfd8c967aa3e25596c82c7b6fab44e960 -
Branch / Tag:
refs/tags/v2.0.1 - Owner: https://github.com/vdesmond
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@c85dddcbfd8c967aa3e25596c82c7b6fab44e960 -
Trigger Event:
push
-
Statement type: