The version finally printed contained
many important ideas which lead to the
theory of chaos. The problem as stated
originally was finally solved by Karl
F. Sundman for n = 3 in 1912 and was
generalised to the case of n > 3
bodies by Qiudong Wang in the 1990s.
used analytic methods to prove the
existence of a convergent infinite
series solution to the three-body
problem in 1906 and 1909.
Wang is best known for his paper The
global solution of the n-body
problem (*), in which he generalised
Karl F. Sundman's results from 1912 to
a system of more than three bodies.
(*)With Zero Angular Momentum, it seems.
There are a large colection of N-Body codes available from the net, and some of them work with GPUs (graphics hardware)
a SoftPedia list of opensource codes
I've downloaded Gravit from the site of Gerald Kaszuba:
I've choosed his work because it is loaded with options, even if it is NOT physically correct:
I've included the Velocity Verlet Integrator to solve this problem.
// Velocity Verlet integrator algorithm
// r(i+1) = r(i) + v(i)*dt + a(i)*dt^2 / 2
// v(i+1/2) = v(i) + a(i) * dt/2
// 1st -- act. pos, 2nd calc accel = a(i+1), 3rd vel, 4th acc
// a(i+1= sum of accels on i+1 (accel)
// v(i+1) = v(i+1/2) + a(i+1)*dt/2
I've also included code to work with my GPU using BROOK+ of AMD/ATI (320 parallel processors, 60000 objects)
In the site of CUDA/OpenCL of NVIDEA can be found NBODY code to work in OpenCL.
Sverre Aarseth codes are a strong reference (code in Git).
Theory in The Art of Computational Science and Maya Project
types of code, and links resources
There are solutions stables with 3 body as we can see in this image.
Your question with two bodys in perpendicular orbits, I think that in general the orbits will tend to become planar. I didnt tested yet about the stability but I think that for aproximate radius they will be unstable.
'The three-body problem with close encounters is notoriously ill-conditioned because it admits chaotic solutions that manifest extreme sensitivity to initial conditions.'
My code is good for a large ensemble of bodies like a galaxy, a star cluster or a disk of matter.
The code for a few bodies must be of 'direct' type (and non GPU) and make use of 'adaptive time step'. In the short range distances the time step must be finer then in the long range and the use of a different reference frame (a local) could benefit the solution.
Picard and Parker-Sochacki based Methods
If I were you I'd explore this very interesting paper An adaptive N-body algorithm of optimal order (2002 ) and this one and this one and THIS ONE with 47 lines of code inside
(I must say 'thank you' because you made me find this new, interesting way)
Table I: Basic Source Code for Solving
the N-body Problem
The preceding 47 lines of code ...
What is stunning is
the simplicity of the solution.
EDIT add 2
I've done some simulations available here where a xls can be downloaded.