You need to be more specific. Think about your goal, and carefully define what you mean.
For example, the path you describe might arise in several ways. The shortest path contained in the surface is not a trivial thing to compute. However, if you define the path as that which is obtained from a vertical cutting plane through the two points, then it is easy enough to generate.
1. Determine which triangles have at least one vertex on each side of the cutting plane.
2. For each triangle so cut, determine which edges are crossed, and using linear interpolation, find the point of intersection. There must be EACTLY two points of intersection as long as the triangle is not "degenerate". Here degenerate would be defined by triangles that are fully contained in the cutting plane, or triangles where an edge is contained in the cutting plane. Such degeneracies can be treated of course by careful code.
3. Since each triangle that was cut has defined a line segment, connect those segments to form a path across the surface.
Best Answer