Why the motion of a simple pendulum considered simple harmonic even though it does not occur in a straight line?