Monday, 26 October 2009

N-body for free

Back in the day I wrote N-body code based on the Barnes-Hut algorithm. At the time you could get a GRAPE board to do the sums very fast:

http://en.wikipedia.org/wiki/Gravity_Pipe

Now it comes "free" in an iMac with a halfway decent graphic card:

http://developer.apple.com/mac/library/samplecode/OpenCL_NBody_Simulation_Example/index.html