Robotic Motion Generation by Using Spatial-Temporal Patterns from Human Demonstrations