# Initial state for a 3-body problem to create Figure 8 [ restricted to 2D ]

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. EDIT : Here is the paper: https://arxiv.org/abs/math/0511219 [thanks to @PM 2Ring] and I want to make something like : • 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 Aug 26, 2022 at 20:00
• I assume you're talking about Cris Moore's work: arxiv.org/abs/math/0511219 sites.santafe.edu/~moore/gallery.html Aug 26, 2022 at 20:05
• 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. Aug 27, 2022 at 0:39

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.9700436;
r = -0.24308753;
r = 0;
v = 0.466203685;
v = 0.43236573;
v = 0;

r = -r;
r = -r;
r = -r;
v = v;
v = v;
v = v;

r = 0;
r = 0;
r = 0;
v = -2*v;
v = -2*v;
v = -2*v;

• 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. Aug 27, 2022 at 9:48
• I tried a bit of debugging my values and turns out there's some miscalibration for gravity and velocity. Aug 27, 2022 at 9:53
• anyway, I'll put the code live in some time Aug 27, 2022 at 9:54
• @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 Aug 27, 2022 at 18:29