N-Body Playground

2D N-body simulation with inverse-square gravity, Mie potential, and wall effects.

UI

Environment

Forces

Lennard-Jones (generalized)

Optimization

Stats

Temperature:
0
Total KE:
0
Potential E:
0
Total E:
0
Mean x accel:
0
Mean y accel:
0
Max acc mag:
0
Current max speed:
0
Mean LJ attraction:
0
Mean LJ repulsion:
0
Sug Steps/Sim s:
0
Render FPS:
0
Steps / Sim s:
0
Steps / Real s:
0
Time Scale req:
0
Time Scale eff:
0
By Arian Prabowo 2025 08 12. The default parameters works for n-body. You can see melting, surface tension causing them to pool together, and finaly frozen. Thanks to GPT-5 for the assistance. TODO: See how much improvement can I get using RK4 TODO: see if I can increase the particle count to by using quad tree.