This project demonstrates a particle system simulation with a cylindrical emitter, particle trails, and plane attractor interaction using OpenGL.
- Cylindrical particle emitter with adjustable number of particles (50-500)
- Particle trails with adjustable length (1-10 positions)
- Transparency that changes based on particle lifetime
- Plane attractor that influences particle movement
- Interactive camera controls
- Real-time parameter display
- Python 3.x
- NumPy
- PyOpenGL
- PyOpenGL-accelerate (optional, but recommended)
pip install -r requirements.txtRun the application:
python main.py- H: Toggle help display
- P: Pause simulation
- E: Toggle emitter visibility
- A: Toggle attractor visibility
- Space: Toggle attractor activation
- R: Reset particles
- Up/Down Arrows: Increase/decrease particle count by 50
- Left/Right Arrows: Decrease/increase trail length
- Mouse drag: Rotate view
- Mouse wheel: Zoom in/out
- Particles are emitted from the surface of a cylinder
- Each particle has:
- Position and velocity
- Size and color
- Transparency that decreases with lifetime
- Trail showing recent positions
- Particles move based on their velocity
- Plane attractor influences particles within its range
- Attraction force increases as particles get closer to the plane
- Particles are rendered as points
- Trails are rendered as line segments with decreasing opacity
- Cylindrical emitter is shown as a wireframe
- Plane attractor is shown as a semi-transparent surface
For detailed technical explanation (in Russian), see detailed_explanation_ru.md.