add hamiltonian pendulum example