This paper introduces an analytic method to generate a continuous ZMP pattern based on a capture point (CP). When a target CP is decided in real-time, the pattern generator makes the CP, ZMP, which it is within convex hull of the supporting feet area, and CoM patterns without discontinuity by closed-form solutions for a single step. Therefore, the proposed pattern generation method does not need a ZMP pattern modification, numerical iterations, and future ZMPs. The method is employed to treat applications such as step length change while walking and push recovery during walking in place. Furthermore, since compliant characteristics such as body oscillation appear in the humanoid robot, we introduce a system model, a double inverted pendulum model with flexible joints for the model-based control. Finally, the real-time walking pattern generation method and the walking control scheme are verified by experiments with the humanoid robot HUBO2.