Correct me if I am wrong, I just overlooked the code, but basically the force (and from that acceleration) of each mass is calculated by
`F = G* m_1 * m_2 / r^2
right? But this is only accurate for two masses. You cant just add up more forces acting on each other, since the expression above is a solution to the differential equation with m d² x / dt² on the other side, which becomes coupled as soon as you have a sum over masses with different distances.
If the acceleration on each body is calculated differently, please state it. If not, please correct it.
Correct me if I am wrong, I just overlooked the code, but basically the force (and from that acceleration) of each mass is calculated by
`F = G* m_1 * m_2 / r^2
right? But this is only accurate for two masses. You cant just add up more forces acting on each other, since the expression above is a solution to the differential equation with m d² x / dt² on the other side, which becomes coupled as soon as you have a sum over masses with different distances.
If the acceleration on each body is calculated differently, please state it. If not, please correct it.