Simulation, Physics, Numerical Methods, Classical Mechanics, Computation.
-l*np.cos(theta) #negative to make sure the pendulum is facing down Pendulum def full_pendulum(g,l,theta,theta_velocity, time_step): theta_acceleration = -(g/l)*np.sin(theta) theta_velocity += time_step*theta_acceleration theta += time_step*theta_velocity return theta, theta_velocity g = 9.8 #m/s^2