This paper introduces an omni-directional walking pattern generation method according to various footprints for a humanoid robot. We propose three step modules for generating stable walking pattern based on zero moment point(ZMP) and linear inverted pendulum model. The proposed step module uses both the characteristics of periodicity and the least square method in order to reduce the fluctuation range of the ZMP trajectory according to various footprints. In order to implement it, the trajectory of the desired ZMP is designed with the quartic polynomials. This method is more insensitive to variation of the walking pattern owing to the initial value of the ZMP and CoM and various walking step length. And it makes more efficient trajectory of CoM on account of the slope of ZMP in the single support phase. The effectiveness of the propose method is verified by simulation.