A 3D simulation of magnetic levitation (maglev) train physics using Python and OpenGL.
This project simulates the magnetic levitation physics of a maglev train system, visualizing the electromagnetic forces, train movement, and track interactions in a 3D environment.
- Real-time 3D visualization of maglev train dynamics
- Physics simulation of electromagnetic levitation forces
- Interactive camera controls to view the simulation from different angles
- Adjustable parameters for magnetic field strength, train mass, speed etc.
- Track editor to create custom maglev routes
- Python 3.7+
- PyOpenGL
- NumPy
- PyGame (for window management)
-
Clone the repository:
git clone https://github/com/Dqrshan/maglev-simulation.git
-
Navigate to the project directory:
cd maglev-simulation -
Virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Run the simulation:

