An Introduction to Hamiltonian Mechanics