Adding energy plot to pendulum