Using a recently developed geometrical method, we study the transition from order to chaos in an important class of Hamiltonian systems. We show agreement between this geometrical method and the surface of section technique applied to detect chaotic behavior. We give, as a particular illustration, detailed results for an important class of potentials obtained from the perturbation of an oscillator Hamiltonian by means of higher-order polynomials.