Overview
N-Body Simulation repeatedly computes interactions between bodies and integrates their motion through time.
Simulates many bodies interacting through forces such as gravity.
Compact metadata for implementation and discovery.
N-Body Simulation repeatedly computes interactions between bodies and integrates their motion through time.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n^2)
Worst
O(t n^2)
Space
O(n)
force = G * m1 * m2 / distance^2Computes gravitational-style pairwise interaction strength.
Show bodies pulling on each other and moving through space.
N-Body Simulation operates in O(n^2) time and O(n) space within the Particle Simulation family. Key governing relation: force = G * m1 * m2 / distance^2. Often compared with Verlet Integration and Smoothed Particle Hydrodynamics.
What each reference supports for this entry.
Simulation reference covering N-Body Simulation integration, particle update, constraint, or animation workflow.
Good next jumps from the relationship graph, ranked for useful discovery.
Barnes-Hut simulation approximates n-body forces to reduce all-pairs interaction cost.