A method to deform non-planar parametric surfaces based on B-splines is presented. To develop this method, an energy functional and its variational formulation are introduced. The deformation of the non-planar surface is made moving the control points of the surface. In order to do that, the space will be discretized and a ordinary differential equation has to be solved. To do it, an analytical solution will be used taking into account the features of B-splines as a finite elements. Our method will be fast because only a reduced number of control points will be moved instead of all the surface points. So, our method can be used to make simulations.