Simulation, Physics, Numerical Methods, Classical Mechanics, Computation.
time_span = np.linspace(0,20,300) #simulate for 20s split into 300 time intervals theta = [] for t in time_span: theta.append(simple_pendulum(theta_0, omega, t, phi)) #Convert back to cartesian coordinates x = l*np.sin(theta) y = -l*np.cos(theta) #negative to make sure the pendulum is facing down