In this paper, a novel method is provided for automatic generation of landmarks to construct statistical shape models. The method generates a sparse polygonal approximation for each shape example in the training set and then automatically aligns the shape polygons by minimizing the L2 distance of the turning functions of their polygonal approximations. The turning function measures the angle of counterclockwise tangent as a function of the arc-length and is especially suitable for shape alignment since it is piecewise constant for a polygon, and invariant under translation, rotation and scaling of the polygon. Based on the minimal L2 distance, a shape classifier is used to remove the shapes very different from the training set to prevent undesirable distortion of the mean shape. For some shapes with non-rigid deformation, such as hands, a local alignment is performed by using a visual part decomposition scheme and a partial match algorithm. Finally, a set of salient match pairs are detected and used to generate the landmarks. This method has been successfully applied to various anatomical structures. As expected, a large portion of shape variability is captured.