A Discrete Mechanics Approach to Gait Generation on Periodically Unlevel Grounds for the Compass-typ