# Produce one smooth curve on one triangle mesh

I hope to get one smooth curve on one triangle mesh. I get one path on the mesh at first. The path consists of vertices of the mesh. I can see the path from the image below.

Each one green dot indicates one vertex on the mesh. The method that I am using is to fit one smooth curve using the vertices and project the smooth curve on the mesh. To project the smooth curve, I find the closest point on the mesh for each vertex of the smooth curve.

However the curve is not on the mesh because it intersects with the mesh. I realize that the vertices need to move along the edge of the triangle shared with the previous vertex.

In my view, there are two kinds of methods to produce the smooth curve. The first kind is to move the points of the curve along the mesh to make the curve smooth. The second kind is to fit the points to obtain one smooth curve and project the smooth curve on the mesh,but the projection should be complex.