N-body Simulations-Applets
Brute Force Applet:
Enter the number of bodies to simulate, and press Restart. You can press Stop to halt the simulation or type in a new number and press Restart to try the simulation with a different number of bodies. Be warned that with the intensity of the code and the restrictions of in-browser applets, if the number of bodies is too big, the code may cause your computer to be sluggish. For this reason, a maximum of 1000 bodies has been imposed, but if you are using a less recent computer, you might want to keep it lower.
Barnes-Hut Applet:
Same instructions as before: enter the number of bodies to simulate, and press Restart. You can press Stop to halt the simulation or type in a new number and press Restart to try the simulation with a different number of bodies. Be warned that with the intensity of the code and the restrictions of in-browser applets, if the number of bodies is too big, the code may cause your computer to be sluggish. The Barnes-Hut code is more efficient than the Brute Force for large N, but it is also more memory intensive (with its tree structure). For this reason, a maximum of 10000 bodies has been imposed, but if you are using a less recent computer, you might want to keep it lower.