A method to reduce or enhance chaos in Hamiltonian flows with two degrees of
freedom is discussed. This method is based on finding a suitable perturbation
of the system such that the stability of a set of periodic orbits changes
(local bifurcations). Depending on the values of the residues, reflecting their
linear stability properties, a set of invariant tori is destroyed or created in
the neighborhood of the chosen periodic orbits. An application on a
paradigmatic system, a forced pendulum, illustrates the method