I a beginner in python and I want to know how I can make the following
((x_0_p1,y_0_p1), (x_0_p2,y_0_p2),...,) # P_1 = planet 1, x_0 or y_0 = position 1
((x_1_p1,y_1_p1), (x_1_p2,y_1_p2),...,)
Maybe easier to understand if I say that I want to plot the position of 8 planets orbiting around a star. I am only given start position (x0,y0) of all the planets, star velocity(vx0,vy0) of all the planets. I want to iterate over all the arrays over time with Euler to plot position and time. I want to store all these positions and velocities per dt in arrays.
Hope you guys understand
Already tried:
import numpy as np
N = 1000 # Number of iterations
r = np.zeros((N,3))# 3darray
v = np.zeros((N,3)) # 3darray
for i in range(N-1):
F = ... # Forces between planet and sun
for j in range(3):
... #Euler solver