Numerical Construction of the Poincare Map, with Applications to Accelerators