Quadrupeds transition spontaneously to various gait patterns (e.g., walk, trot, pace, gallop) in response to the locomotion speed. The generation of these gait patterns has been the subject of debate for a long time. We propose a coupled oscillator model that is coupled with the physical interactions of the body. The results of this study showed that the gait pattern transitions spontaneously to walking/trotting/pacing/bounding in manner similar to that of real quadruped animals when the resonating portion of the body is changed according to the speed of leg movement. We also observed that pacing is expressed exclusively instead of trotting by changing the physical characteristics. In addition to leading to understanding of the principles of locomotion in living things, the coupled oscillator model proposed in this study is expected to lead to the creation of a legged robot that can select an energy-efficient gait and transition to it spontaneously.