Simulation of Ideal Gas Particles
eeweb.com
eeweb.com
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.