3 ms·
Simulation of Ideal Gas Particles
- dalke 16y ago"To keep track of just 500 balls, we have to make (500501/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.