Interactive physics lab simulations built with Python and Streamlit for exploring core concepts in classical mechanics. Adjust physical parameters with sliders and watch the results update in real time.
- 🚀 Live app: https://amorenobr.github.io/Lab_Simulations_Python/
- 📖 Documentation: https://amorenobr.github.io/Lab_Simulations_Python/docs/
- Projectile Motion - Launch a projectile at a chosen speed and angle and visualize its trajectory. Computes time of flight, maximum height, and horizontal range from the kinematic equations.
- Damped Harmonic Oscillator - A mass on a spring. Vary the mass, stiffness, and damping to move between undamped, underdamped, critically damped, and overdamped motion.
This project uses Pixi to manage its environment and dependencies.
git clone https://github.com/amorenobr/Lab_Simulations_Python.git
cd Lab_Simulations_Python
pixi installpixi run streamlit run Simulations.pyThen open the URL shown in the terminal.
Run the tests:
pixi run pytestBuild the documentation:
cd docs && pixi run make htmlThe HTML output is written to docs/build/html.
Lab_Simulations_Python/
├── Simulations.py # Streamlit landing page
├── pages/ # One file per simulation
├── src/lab_simulations_python/ # Physics engines (importable package)
├── tests/ # Pytest suite
├── docs/ # Sphinx documentation
└── index.html # stlite (WebAssembly) build for GitHub Pages
- Streamlit / stlite — user interface
- NumPy — numerical computation
- Plotly — interactive plots
- Sphinx — documentation
- Pixi — environment management
This project is licensed under the MIT License - see the LICENSE file for details
Alexander Moreno Briceño - Universidad Antonio Nariño