This particle simulator provides a visualization for adding 2-dimensional particles onto a 1280 x 720 pixel black canvas. Collisions with walls or the edges of the canvas induce elastic collisions and reflect the particle's angle accordingly.
The program allows users to specify the position, angle, and velocity of particles added to the canvas. Particles can also be added in batches with varying starting positions, angles, or velocities.
- Clone this repository and pull.
- Access the precompiled executable file in the x64 Debug folder.
- Open Visual Studio (at least version 2019) and select "Open a project or solution."
- Select the "Particle-Sim.sln" file and VS 2022 should open the code in the IDE itself. To view the source code, open the Solution Explorer and navigate to the "Source Files" folder. The "Particle-Sim.cpp" source code can be selected to view the codebase.
- Click the play button "Local Windows Debugger" and ensure the build configuration is set to Debug and x64 architecture.