Construction of the patch library. (a) First, we extract the surface patches from the data set; atoms are marked by small spheres in the patch. (b) Then, we group of the patches into k clusters; the atoms of the patches in each cluster are superimposed on the cluster centroid. For clarity, we omit the surfaces, and render the atoms of each patch in the cluster in a different color. (c) The surface patch library is represented by the cluster centroids.