Lets take thess points.
pt={{-4.65371,0.1},{-4.68489,0.103169},{-4.78341,0.104834},{-4.83897,0.100757},
{-4.92102,0.0949725},{-4.93456,0.100181},{-4.89166,0.1226
I've just read in a comment to nikie's answer that what you really want is the algorithm for an airfoil. So, I am posting another (unrelated) answer to this problem:
Seems easier than the general problem, because it is "almost convex". I think the following algorithm reduce the risks that FindShortestTour inherently has at the acute vertex:
- Find the
ConvexHull
(that accounts for the upper and attack surfaces)- Remove from the set the points in the convex hull
- Perform a
FindShortestTour
with the remaining points- Join both curves at the nearest endpoints
- Voilà
Like this:
pt1 = Union@pt;
<< ComputationalGeometry`
convexhull = ConvexHull[pt1, AllPoints -> True];
pt2 = pt1[[convexhull]];
pt3 = Complement[pt1, pt2];
pt4 = pt3[[(FindShortestTour@pt3)[[2]]]];
If[Norm[Last@pt4 - First@pt2] > Norm[Last@pt4 - Last@pt2], pt4 = Reverse@pt4];
pt5 = Join[pt4, pt2, {pt4[[1]]}];
Graphics[{Arrowheads[.02], Arrow@Partition[pt5, 2, 1],
Red, PointSize[Medium], Point@pt1}]