/particles

Particle demos using openGL

Primary LanguageC++MIT LicenseMIT

particles

Implements particle systems using openGL

TODO: Add a representative image for your project here

How to build

Windows

Open git bash to the directory containing this repository.

particles $ mkdir build
particles $ cd build
particles/build $ cmake -G "Visual Studio 16 2019" ..
particles/build $ start CS312-Particles.sln

Your solution file should contain two projects: pixmap_art and pixmap_test. To run from the git bash command shell,

particles/build $ ../bin/Debug/billboard
particles/build $ ../bin/Debug/confetti
particles/build $ ../bin/Debug/demo

macOS

Open terminal to the directory containing this repository.

particles $ mkdir build
particles $ cd build
particles/build $ cmake ..
particles/build $ make

To run each program from build, you would type

particles/build $ ../bin/billboard
particles/build $ ../bin/confetti
particles/build $ ../bin/demo

Results

  1. Intial Bollboard

Screen Shot 2021-04-30 at 2 22 10 PM

  1. After Implementing position and Scaling

Screen Shot 2021-04-30 at 2 21 31 PM

  1. after applying the view-projection matrix
Screen.Recording.2021-05-27.at.9.11.21.PM.mov
  1. After setting billboard to face the camera
Screen.Recording.2021-05-27.at.9.14.19.PM.mov

The billboard is moving but since it is always facing camera it appears still.

Confetti Implementation

  1. one particle movement
Screen.Recording.2021-05-27.at.9.17.00.PM.mov
  1. 500 particles Movements
Screen.Recording.2021-05-27.at.9.20.04.PM.mov
  1. 500 particles with cheap sort
for each particle
   d2 = distance from particle to camera
   d1 = distance from previous particle to camera
   if d2 < d1
      swap(particle, previous particle)
Screen.Recording.2021-05-27.at.9.23.04.PM.mov

Unique particle implementation: Explosion

Screen.Recording.2021-05-27.at.9.25.30.PM.mov