Poincaré’s 3 bodies problem

Poincaré’s 3 bodies problem

# 3 bodies’s problem

l12=((x1-x2)^2+(y1-y2)^2)^(3/2)

l13=((x1-x3)^2+(y1-y3)^2)^(3/2)

l23=((x2-x3)^2+(y2-y3)^2)^(3/2)

x1'=x1p

x1p'=G*m2/l12*(x2-x1)+G*m3/l13*(x3-x1)

x2'=x2p

x2p'=G*m1/l12*(x1-x2)+G*m3/l23*(x3-x2)

x3'=x3p

x3p'=G*m1/l13*(x1-x3)+G*m2/l23*(x2-x3)

y1'=y1p

y1p'=G*m2/l12*(y2-y1)+G*m3/l13*(y3-y1)

y2'=y2p

y2p'=G*m1/l12*(y1-y2)+G*m3/l23*(y3-y2)

y3'=y3p

y3p'=G*m1/l13*(y1-y3)+G*m2/l23*(y2-y3)

param m1=5e-4, m2=5e-4, m3=100, G=67

param scale=0.01, scale1=1, scale2=1, scale3=3

init x1=10, x2=20, y1p=20, y2p=10

@ BOUNDS=10000

@ DT=0.01

done

In fact, with this numerical simulations it is possible to obtain the three laws of Kepler.

more about the three body problem:

http://en.wikipedia.org/wiki/Henri_Poincar%C3%A9#The_three-body_problem

more about Kepler’s laws:

http://en.wikipedia.org/wiki/Kepler%27s_laws_of_planetary_motion