Pendulum motion and tension calculations