![simulate eclipse 2017 in Universe sandbox 2 simulate eclipse 2017 in Universe sandbox 2](https://universesandbox.com/screenshots/Universe-Sandbox-2-Comet-Planets.jpg)
Solving a 2-body problem is much easier than solving an n-body problem. This mode (which of course could be toggled) would collapse the existing n-body simulation into a series of 2-body problems: Moon & Earth, Earth & Sun, Europa & Jupiter, Jupiter & Sun, etc. One solution proposed by Thomas, our physics programmer, is to allow for a special mode within simulations running at high time steps. So how can we get around this problem? How can we accurately simulate thousands of objects while still allowing for large steps forward in time? For example, what if you wanted to simulate our solar system on a time scale of millions of years per second so that you could see the evolution of our Sun? But at the same time, most people also don’t want a limit on how fast they can run their simulation. This isn’t what most people want in their simulations. Moons crash into planets, Mercury gets thrown out of the solar system - things like that. And the greater the error, the more likely it is that an orbit, which otherwise would be stable, falls apart. This means the potential for greater error. If you crank up the time step, the simulation then has to take fewer, larger steps. This means setting a maximum error tolerance for each step and also making sure the total error doesn’t reach an upper limit. Errors will still happen, but taking smaller steps reduces them.īy default, the simulations in Universe Sandbox ² try to set an accuracy which prevents orbits from falling apart due to error. Solving an n-body problem requires calculating how each object affects each other object every step of the way. Unfortunately, when solving for many objects, or n objects, you can’t just jump forward in time without getting massive errors. In Universe Sandbox ², every object is simulated as part of an n-body problem. The problem of the n-body problem in Universe Sandbox ²
![simulate eclipse 2017 in Universe sandbox 2 simulate eclipse 2017 in Universe sandbox 2](https://gamefabrique.com/storage/screenshots/saturn/solar-eclipse-12.png)
![simulate eclipse 2017 in Universe sandbox 2 simulate eclipse 2017 in Universe sandbox 2](https://i.ytimg.com/vi/Ho9T0za9ajE/maxresdefault.jpg)
So to account for all of these gravitational forces, you need to use an n-body solution. The same is true when looking at the Sun and Earth: the Sun is not the only object pulling on Earth. The issue here is that the Moon is not affected gravitationally by just the Earth it is also being pulled by the Sun, and Jupiter, and every other object in space. The Earth pulls on the Moon quite a bit, keeping it in orbit, and the Moon pulls on the Earth just a little bit. It’s helpful to frame this in contrast to the two-body problem, which looks at the motion of just two objects interacting with each other. For example, you can look at the Earth and Moon as a two-body problem. The n-body problem can be defined as “the problem of predicting the individual motions of a group of celestial objects interacting with each other gravitationally.” Or, in a gravitational system of n bodies (where n can be any number), where will they all be after one year?
![simulate eclipse 2017 in Universe sandbox 2 simulate eclipse 2017 in Universe sandbox 2](https://gamefabrique.com/storage/screenshots/saturn/solar-eclipse-13.png)
(From Universe Sandbox ²) What is the n-body problem? Orbits of major planets and all possible dwarf planets in our solar system.