CPU Particle Simulation GPU Particle Simulation

About

This is a simulation that compares the performance of CPU and GPU implementations for a shower system. Particles full under gravity, decrease in temperature over time, and merge when colliding affecting mass that can be seen visually through display options. The CPU implementation is made in Rust while the GPU implementation is in C++/CUDA. Visualisation for both projects is done with OpenGL, and the source codes can be viewed from the links above.

Design Requirements

  1. Size requirements
  2. Wall modes (sticky, reflective, toroidal)
  3. Thermal / mass modes
  4. Render stride
  5. FPS and floor hit counter

CPU Implementation

CPU implementation of the particle simulation was done in Rust. Simulation multi-threaded with collisions handled by mutex-protected shards.

Particle Count Frames Per Second (FPS)
19
28
37
46
55

GPU Implementation

GPU implementation of the particle simulation was done in C++ and CUDA. Simulation parallelised with collisions handled by GPU kernels.

Particle Count Frames Per Second (FPS)
19
28
37
46
55

Simulation Visualisation

Thermal Mode

Temperature of particles

Mass Mode

Combined mass of merged particles

Confetti Mode

Just for fun

Wall Modes

Sticky, reflective, toroidal

Spritesheet Import Spritesheet Export Spritesheet Finish