This Website Lead Tracker Demo Python Game JavaScript Particle Sim C++ Embedded Design
Lead Tracker
Contact Info Certifications Resume LinkedIn

4.1. Pool

Here's a simple demonstration of the particle simulator that mimics an environment everyone's familiar with: pool! Here you can easily observe how particles interact with the walls and with themselves.

In the top-left corner you'll see some interesting stats. The top row shows how well your device is processing the simulation, with 60 frames per second (FPS) generally being the maximum (sometimes 30 FPS is max on mobile devices with power-saving mode active). The percentage indicates how much of the full potential processing power is needed. For this simple demo, most systems will be under 10%, but as this number increases for more complex setups, you may get closer to 100% and eventually go to a lower FPS to compensate.

The 2nd row shows the total kinetic energy of all the particles. The units are useless to show here since our units of mass and distance are just made up, but the calculation is the normal (1/2)mv^2 equation. And because all collisions between atoms and with the walls are completely elastic, the total energy of the system remains completely constant.

If you move your mouse around, you'll see a blue ball tracking your cursor and some other red lines. The blue lines show a trajectory from the anchor point to the cursor, and the red lines show the trajectory a particle would take if it were launched along that trajectory and bounced along the walls (doesn't factor in collisions with other atoms). Try moving the mouse around to see different trajectories and click around to move the anchor point as well. If the mouse trajectory indicator is more annoying than interesting, you can disable it using the button in the top-right.