This is a non-interacting particle simulator inspired by Ed Angels OpenGL example. Basically all that a particle can do is
move in a straight line. but some trickery makes it look like it bounces around. Since its just a shader trick it can handle
20,000, or more, particles very easily.
how it works
every particle starts with an initial position and velocity. Modulo arithmatic allows the particle to bounce off of walls.
here is a graph of the bounce function that makes the particles appear to bounce off walls. It is applied to the x,y, and z positions
The trackball taught me a lot about quaternions. Some of which I understand. for example i,j,k are all different imaginary numbers. There is a multiplaication table that was invented for them that allows them to actually work.
it also is very cool technique.
Add a bounding box to make it visually appealing.
Add slider to change number of particles.
I don't see an easy way to allow inter-particle interactions.
seems to be limited to a cube environment.
probably difficult to implement gravity or any other forces.