Skip to content

An openCL and openGL simulation of movement of millions of particles in space

Notifications You must be signed in to change notification settings

conanwu777/particle_system

Repository files navigation

Particle System

An openCL and openGL simulation of movement of millions of particles in space

Performance

  • Allocate memory directly on GPU without ever use RAM
  • Massive parallel computing through kernel with OpenCl, then pass to OpenGL
  • Render up to 3,000,000 particles at 60 FPS (run on standard 4 Core iMac) and 10,000,000 particles at 30 FPS

Features

  • Start with either disk (with commend-line flag -s) or square:

alt_text alt_text

  • Hue moving with time, key "F" to lock/release hue
  • Adjust saturation and value with arrow keys
  • adjust background color with keys "QW", "AS" and "ZX" for RGB:

alt_text

  • Mouse scoll-wheel (up-down) to zoom in and out
  • Mouse scoll-wheel (left-right) to increase/decrease gravity

alt_text

  • Mouse click to add more gravity points
  • Key "C" to release gravity points

alt_text

  • Commend-line arguments to select number of particles
  • Key "+", "-" to adjust the size of particles

alt_text

  • Key "E" to stop/resume all gravity (all particles start travelling at current speed)

alt_text

Screen Shots

alt_text

alt_text

alt_text

alt_text

alt_text

About

An openCL and openGL simulation of movement of millions of particles in space

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published