Phase portrait of Hamiltonian systems with homogeneous nonlinearities