CS373: new gradient descent algorithm for path smoothing