Group Project - Particle Simulation - Computer Graphics
Group Project - Particle Simulation - Computer Graphics
-----------------------------------------------------------------------------------------------
GROUP MEMBERS: 麦默德 – 1820222024, 巴戈 – 1820222043, 胡天 – 1820222022, 罗卡 - 1820222033
Setting Up PyCharm
Open PyCharm and configure the Python interpreter:
Go to File > Settings > Project > Python Interpreter and ensure the correct Python version is
selected. Run our Code in PyCharm, or the VS file should directly take you to Visual Studio
Particle Class:
Particle System Initialization: Creates a list of 1000 particles, that later are subject to
random movements and colors based on the code we have created to achieve the firework
effect
Main Function: The main function o the code is that it initializes Pygame. It sets up the
display with OpenGL settings and configures perspective and translation for 3D viewing. It also
enables point smoothing and sets point size.
The code enters the main loop where:
It handles events, especially for quitting.
Clears the screen and begins drawing points, updates and draws each particle, swaps buffers
and waits for a short interval.
Project Summary
This project involves creating a particle system to simulate fireworks using OpenGL for rendering
and Pygame for window management. The key tasks include initializing particles, updating their
properties over time, and rendering them to create the firework effect. Using PyCharm or Visual
Studio Code as the IDE simplifies writing, testing, and debugging the code.