Lorenz Attractor Professional Suite
A comprehensive, professional-grade simulation and visualization toolkit for the Lorenz attractor and related chaotic dynamical systems. This project transforms a basic college simulation into a production-quality scientific computing package.
🌟 Features
Core Simulation Engine
- Advanced Numerical Integration: Multiple methods including Euler, RK4, adaptive RK, and Dormand-Prince 5(4)
- High-Performance Computing: Numba-compiled critical functions for optimal performance
- Parameter Management: Type-safe parameter handling with validation
- True Random Initial Conditions: Integration with system entropy for reproducible randomness
Visualization & Graphics
- Real-time 3D Visualization: OpenGL, ModernGL, and Pygame backends
- Professional Plotting: Publication-quality matplotlib and interactive Plotly visualizations
- Multiple View Modes: 3D trajectories, 2D projections, phase space analysis
- Video Export: High-quality MP4 and GIF animation export with customizable quality settings
Advanced Analysis
- Parameter Sweeps: Automated exploration of parameter space
- Bifurcation Analysis: Comprehensive bifurcation diagram generation
- Lyapunov Exponents: Accurate calculation of system stability measures
- Poincaré Sections: Phase space cross-sections for detailed analysis
- Sensitivity Analysis: Butterfly effect demonstration and quantification
Data Management
- Multiple Export Formats: CSV, JSON, HDF5, NumPy, MATLAB, and Pickle
- Comprehensive Data Packages: Bundled exports with metadata and documentation
- Simulation Metadata: Detailed tracking of simulation parameters and performance
User Interfaces
- Command Line Interface: Full-featured CLI with comprehensive options
- Web Application: Interactive Dash-based web interface for exploration
- Python API: Clean, documented API for programmatic use
🚀 Quick Start
Installation
# Clone the repository
git clone https://github.com/josesolisrosales/lorenz-attractor.git
cd lorenz-attractor
# Install dependencies
pip install -r requirements.txt
# Install the package
pip install -e .
Basic Usage
from lorenz_attractor import LorenzSystem, Simulator, LorenzPlotter
from lorenz_attractor.core.parameters import InitialConditions, SimulationConfig
# Create and run simulation
system = LorenzSystem()
simulator = Simulator(system)
initial_conditions = InitialConditions(x=1.0, y=1.0, z=1.0)
config = SimulationConfig(dt=0.01, num_steps=10000)
result = simulator.simulate(initial_conditions, config)
# Visualize results
plotter = LorenzPlotter(style='dark')
fig = plotter.plot_3d_trajectory(result)
Command Line Interface
# Basic simulation
lorenz-sim simulate --sigma 10 --rho 28 --beta 2.667
# Parameter sweep
lorenz-sim sweep --parameter rho --range 20 30 --steps 100
# Real-time visualization
lorenz-sim realtime --method pygame
# Launch web interface
lorenz-sim web
Web Interface
# Launch interactive web application
lorenz-sim web --host 0.0.0.0 --port 8050
Then open http://localhost:8050 in your browser.
📊 Examples
Parameter Sensitivity Analysis
# Demonstrate butterfly effect
base_ic = InitialConditions(x=1.0, y=1.0, z=1.0)
perturbed_ic = InitialConditions(x=1.0 + 1e-10, y=1.0, z=1.0)
results = simulator.simulate_multiple([base_ic, perturbed_ic], config)
# Results show exponential divergence characteristic of chaos
Bifurcation Analysis
# Analyze system behavior across parameter range
bifurcation_data = simulator.bifurcation_analysis(
'rho', (0.5, 50), num_points=200,
initial_conditions=base_ic, config=config
)
plotter = LorenzPlotter()
fig = plotter.plot_bifurcation_diagram(bifurcation_data)
Video Export
# Create high-quality animation
video_exporter = VideoExporter(fps=60, dpi=200)
video_exporter.export_trajectory_animation(
result, "lorenz_evolution.mp4",
quality='ultra', trail_length=1000
)
🏗️ Architecture
The package is organized into modular components:
lorenz_attractor/
├── core/ # Core simulation engine
│ ├── lorenz.py # Lorenz system implementation
│ ├── simulator.py # Simulation orchestration
│ └── parameters.py # Parameter management
├── integration/ # Numerical integration methods
├── visualization/ # Plotting and real-time graphics
├── export/ # Data and video export
├── analysis/ # Advanced analysis tools
├── web/ # Web interface
└── utils/ # Utility functions
🎯 Advanced Features
Performance Optimization
- Numba JIT compilation for critical loops
- Parallel simulation execution
- Memory-efficient data structures
- Optimized integration algorithms
Scientific Computing
- IEEE 754 compliant floating-point arithmetic
- Adaptive step size control
- Error estimation and monitoring
- Numerical stability analysis
Extensibility
- Plugin architecture for custom integrators
- Configurable visualization backends
- Extensible export formats
- Modular analysis components
📈 Performance
Typical performance on modern hardware:
- Basic simulation (10k points): ~0.1 seconds
- Parameter sweep (100 simulations): ~10 seconds
- Bifurcation analysis (1000 points): ~2 minutes
- Video export (1 minute HD): ~30 seconds
🔬 Scientific Applications
This toolkit is suitable for:
- Chaos Theory Research: Detailed analysis of chaotic dynamics
- Educational Demonstrations: Interactive exploration of nonlinear systems
- Numerical Methods Development: Testing integration algorithms
- Visualization Research: Advanced scientific visualization techniques
📚 Documentation
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
📄 License
This project is licensed under the MIT License - see LICENSE for details.
🙏 Acknowledgments
- Edward Lorenz for discovering the Lorenz attractor
- Scientific Python Community for the excellent ecosystem
- NumPy, SciPy, Matplotlib for foundational tools
- Plotly, Dash for modern web visualization
📞 Citation
If you use this software in academic work, please cite:
@software{lorenz_attractor_pro,
title={Lorenz Attractor Professional Suite},
author={Jose Solis Rosales},
year={2024},
url={https://github.com/josesolisrosales/lorenz-attractor},
version={2.0.0}
}
Transform your understanding of chaos with professional-grade simulation tools. 🦋
Metadata
Release files for lorenz-attractor 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lorenz_attractor-2.0.0.tar.gz | 47.3 kB | With provenance | Details for lorenz_attractor-2.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lorenz_attractor-2.0.0-py3-none-any.whl | Python 3 | none | any | Details for lorenz_attractor-2.0.0-py3-none-any.whl |
Total release size: 91.5 kB
Release files / lorenz_attractor-2.0.0.tar.gz
| Download URL | lorenz_attractor-2.0.0.tar.gz |
|---|---|
| Size | 47.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5dc7c895583ca253a1907a2ca754e0c025d48690cf6fc6316b4f9c56252d2cba
|
|
BLAKE2b-256 checksum How to use checksums |
18e92b72d20a26e4f1840b39e9dd1cb638b61d82a29f1dd685c37428a3850c7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 4, 2025.
Transparency logRelease files / lorenz_attractor-2.0.0-py3-none-any.whl
| Download URL | lorenz_attractor-2.0.0-py3-none-any.whl |
|---|---|
| Size | 44.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6d805ebe060d65745023841065ea82cd91d6f22af0dabd7eb1dfdf5fdf6b76d
|
|
BLAKE2b-256 checksum How to use checksums |
a5d44a0aaa858b92411db4a6c82241b551e1066b7b3ed470c734fc985a8524a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 4, 2025.
Transparency logSecurity for lorenz-attractor 2.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for lorenz_attractor-2.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 4, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.