If a sail is fastened at its foot and luff, the cut of the sail alone does not determined its shape. For this geometry, an “ideal” sail shape is generally not obtainable.
However, if one could fasten all points of the sail edge to a rigid structure, one could essentially determine the entire sail shape. The only requirement is that the sail must have positive curvature (be cup-shaped, not flat and not saddle-shaped) at each interior point.
Thanks to Warren Smith for pointing out this oversight. The mathematics of this is based on work by Cauchy, Pogorelov and Alexandrov.