Motor Skills Learning and Generalization with Adapted Curvilinear Gaussian Mixture Model