Professional-grade Lorenz attractor simulation suite
Project description
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. 🦋
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 lorenz_attractor-2.0.0.tar.gz.
File metadata
- Download URL: lorenz_attractor-2.0.0.tar.gz
- Upload date:
- Size: 47.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dc7c895583ca253a1907a2ca754e0c025d48690cf6fc6316b4f9c56252d2cba
|
|
| MD5 |
366f389ab879257a4dfd7869039b9b51
|
|
| BLAKE2b-256 |
18e92b72d20a26e4f1840b39e9dd1cb638b61d82a29f1dd685c37428a3850c7d
|
Provenance
The following attestation bundles were made for lorenz_attractor-2.0.0.tar.gz:
Publisher:
publish-to-pypi.yml on josesolisrosales/lorenz-attractor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lorenz_attractor-2.0.0.tar.gz -
Subject digest:
5dc7c895583ca253a1907a2ca754e0c025d48690cf6fc6316b4f9c56252d2cba - Sigstore transparency entry: 262346475
- Sigstore integration time:
-
Permalink:
josesolisrosales/lorenz-attractor@271646d6595c55e327c6327ccb21f5cf324a6ebe -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/josesolisrosales
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@271646d6595c55e327c6327ccb21f5cf324a6ebe -
Trigger Event:
release
-
Statement type:
File details
Details for the file lorenz_attractor-2.0.0-py3-none-any.whl.
File metadata
- Download URL: lorenz_attractor-2.0.0-py3-none-any.whl
- Upload date:
- Size: 44.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6d805ebe060d65745023841065ea82cd91d6f22af0dabd7eb1dfdf5fdf6b76d
|
|
| MD5 |
6cac818999f64a2824ef00477097e8ad
|
|
| BLAKE2b-256 |
a5d44a0aaa858b92411db4a6c82241b551e1066b7b3ed470c734fc985a8524a8
|
Provenance
The following attestation bundles were made for lorenz_attractor-2.0.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on josesolisrosales/lorenz-attractor
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lorenz_attractor-2.0.0-py3-none-any.whl -
Subject digest:
f6d805ebe060d65745023841065ea82cd91d6f22af0dabd7eb1dfdf5fdf6b76d - Sigstore transparency entry: 262346478
- Sigstore integration time:
-
Permalink:
josesolisrosales/lorenz-attractor@271646d6595c55e327c6327ccb21f5cf324a6ebe -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/josesolisrosales
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@271646d6595c55e327c6327ccb21f5cf324a6ebe -
Trigger Event:
release
-
Statement type: