Python implementation of n-body problem issue
问题 I am currently trying to implement the N-body problem using Euler's method for solving differential equations. However, the graphical outputs do not seem correct, and I'm not sure where the issue in my code is after a while of testing. I'm currently using approximate values for Alpha Centauri A and B to test. This is my code: import numpy as np import matplotlib.pyplot as plt from math import floor # gravitation constant G = 6.67430e-11 # astronomical units au = 1.496e11 sec_in_day = 60 * 60