

Simulation of Ideal Gas Particles - proee
http://www.eeweb.com/project/steven_hochstadt/simulation-of-ideal-gas-particles

======
dalke
"To keep track of just 500 balls, we have to make (500 _501/2 comparisons)_
(60 frames per second) = 7,515,000 comparisons per second."

This is incorrect. Space partitioning makes the distance search much faster.

Ideal gas simulations started in the 1950s. One of the standard optimizations
is to compute time until next collision and use a priority queue. Pop the
smallest item off the queue and advance everything by that step, compute the
collision, then do the 500 or so line intersection tests to figure out when
the next collision will occur, and put that back into the queue.

