<p>The initial condition are supposedly given in table 1 of Simó, C. (2001). <em>New Families of Solutions in N-Body Problems</em>, however I couldn't decipher the y position of the first and second bodies from there.</p>
<p>I found a slightly different version of the initial conditions in <a href="http://www.artcompsci.org/msa/web/vol_1/v1_web/node45.html" rel="nofollow noreferrer">this website</a>:</p>
<pre><code>r[0][0] = 0.9700436;
r[0][1] = -0.24308753;
r[0][2] = 0;
v[0][0] = 0.466203685;
v[0][1] = 0.43236573;
v[0][2] = 0;

r[1][0] = -r[0][0];
r[1][1] = -r[0][1];
r[1][2] = -r[0][2];
v[1][0] = v[0][0];
v[1][1] = v[0][1];
v[1][2] = v[0][2];

r[2][0] = 0;
r[2][1] = 0;
r[2][2] = 0;
v[2][0] = -2*v[0][0];
v[2][1] = -2*v[0][1];
v[2][2] = -2*v[0][2];
</code></pre>

CC BY-SA 4.0
2022-08-27T09:48:22.237Z
This seems to be perfect, i tried recreating it an there its not holding up, something's really off, I was wondering if you could spare a lil bit of time and try to make a model for this in some software, because I still cant throttle the time stamp in my library, it runs on a dt= 1/144 sec.
Beetran Dahiya
CC BY-SA 4.0
2022-08-27T09:53:37.570Z
I tried a bit of debugging my values and turns out there's some miscalibration for gravity and velocity.
Beetran Dahiya
CC BY-SA 4.0
2022-08-27T09:54:08.257Z
anyway, I'll put the code live in some time
Beetran Dahiya
CC BY-SA 4.0
2022-08-27T18:29:42.933Z
@BeetranDahiya have you tried running the code that is shown in the website I linked? If that doesn't work, the problem might be in the initial conditions. Otherwise you could try to use this working version to fix your code
Prallax
CC BY-SA 4.0
2022-08-27T07:58:48.010Z
2022-08-27T07:58:48.010Z
Prallax
<p>I've made an n-body simulation solution using the naive algorithm of O(n^2) in my library ChelseaaJS.<br>
I was trying to make some pleasing 3 Body simulations.<br>
I wanna do the 8 figure thing.<br>
I know it's a 3D simulation restricted to 2D to create 8-figure as given in the famous research paper on the same.<br>
I wanted to know if there is any particular initial state of the system in 2d i.e. given position and speed of masses.</p>
<p>Example of the n-body simulation:<br>
This is just a basic solar system, nothing fancy.
I will put it live if anyone wants to use it, tweak it.</p>
<p><a href="https://i.sstatic.net/tVcyV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/tVcyV.png" alt="enter image description here" /></a></p>
<p>EDIT :
Here is the paper: <a href="https://arxiv.org/abs/math/0511219" rel="nofollow noreferrer">https://arxiv.org/abs/math/0511219</a> [thanks to
@PM 2Ring]
and I want to make something like :
<a href="https://i.sstatic.net/eEPWZ.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eEPWZ.png" alt="enter image description here" /></a></p>

CC BY-SA 4.0
2022-08-26T20:00:10.677Z
Hi, welcome to Astronomy SE! What famous research paper are you referring to? Could you edit the question and add a link to it? I think it could be useful to understand what kind of 8-figure you are trying to obtain
Prallax
CC BY-SA 4.0
2022-08-26T20:05:42.620Z
I assume you're talking about Cris Moore's work: https://arxiv.org/abs/math/0511219 https://sites.santafe.edu/~moore/gallery.html
PM 2Ring
CC BY-SA 4.0
2022-08-27T00:39:29.050Z
I just added the link to the paper (the same as given by @PM 2Ring) and I added a photo of what I mean by 8 figure.
Beetran Dahiya
<solar-system><gravity><astrophysics><n-body-simulations>
Initial state for a 3-body problem to create Figure 8 [ restricted to 2D ]
Beetran Dahiya
# Initial state for a 3-body problem to create Figure 8 [ restricted to 2D ]

(Asked by: username_0 on 2022-08-26)

I've made an n-body simulation solution using the naive algorithm of O(n^2) in my library ChelseaaJS.  
I was trying to make some pleasing 3 Body simulations.  
I wanna do the 8 figure thing.  
I know it's a 3D simulation restricted to 2D to create 8-figure as given in the famous research paper on the same.  
I wanted to know if there is any particular initial state of the system in 2d i.e. given position and speed of masses.

Example of the n-body simulation:  
This is just a basic solar system, nothing fancy.
I will put it live if anyone wants to use it, tweak it.

[![enter image description here](https://i.sstatic.net/tVcyV.png)](https://i.sstatic.net/tVcyV.png)

EDIT :
Here is the paper: <https://arxiv.org/abs/math/0511219> [thanks to
@PM 2Ring]
and I want to make something like :
[![enter image description here](https://i.sstatic.net/eEPWZ.png)](https://i.sstatic.net/eEPWZ.png)

**Tags:** solar-system, gravity, astrophysics, n-body-simulations
> **Comments:**
> **username_1**: Hi, welcome to Astronomy SE! What famous research paper are you referring to? Could you edit the question and add a link to it? I think it could be useful to understand what kind of 8-figure you are trying to obtain  
> **username_2**: I assume you're talking about Cris Moore's work: https://arxiv.org/abs/math/0511219 https://sites.santafe.edu/~moore/gallery.html  
> **username_0**: I just added the link to the paper (the same as given by @PM 2Ring) and I added a photo of what I mean by 8 figure.  

---

## 1 answers

### Answer by username_1 on 2022-08-27. Score: 1 | Accepted answer

The initial condition are supposedly given in table 1 of Simó, C. (2001). New Families of Solutions in N-Body Problems, however I couldn't decipher the y position of the first and second bodies from there.
I found a slightly different version of the initial conditions in this website:
r[0][0] = 0.9700436;
r[0][1] = -0.24308753;
r[0][2] = 0;
v[0][0] = 0.466203685;
v[0][1] = 0.43236573;
v[0][2] = 0;

r[1][0] = -r[0][0];
r[1][1] = -r[0][1];
r[1][2] = -r[0][2];
v[1][0] = v[0][0];
v[1][1] = v[0][1];
v[1][2] = v[0][2];

r[2][0] = 0;
r[2][1] = 0;
r[2][2] = 0;
v[2][0] = -2*v[0][0];
v[2][1] = -2*v[0][1];
v[2][2] = -2*v[0][2];

> **Comments:**
> **username_0**: This seems to be perfect, i tried recreating it an there its not holding up, something's really off, I was wondering if you could spare a lil bit of time and try to make a model for this in some software, because I still cant throttle the time stamp in my library, it runs on a dt= 1/144 sec.  
> **username_0**: I tried a bit of debugging my values and turns out there's some miscalibration for gravity and velocity.  
> **username_0**: anyway, I'll put the code live in some time  
> **username_1**: @BeetranDahiya have you tried running the code that is shown in the website I linked? If that doesn't work, the problem might be in the initial conditions. Otherwise you could try to use this working version to fix your code  

---

