We present a method to calculate numerically the action variables of a
completely integrable Hamiltonian system with N degrees of freedom. I
t is a construction of the Liouville-Arnol'd theorem for the existence
of tori in phase space. By introducing a metric on phase space the pr
oblem of finding N independent irreducible paths on a given torus is t
urned into the problem of finding the lattice of zeros of an N-periodi
c function. This function is constructed using the flows of all consta
nts of motion. Using the fact that neighbouring tori and their irreduc
ible paths are related by some continuous deformation, a continuation
method is constructed which allows a systematic scan of the actions. F
or N = 2 we use a Poincare surface of section to define paths which cr
oss neighbouring tori. Close to isolated periodic orbits the generator
s are either constructed explicitly or their asymptotic behaviour is g
iven. As an example, the energy surface in the space of action variabl
es of a Hamiltonian showing resonances is calculated.