This paper presents a procedure for synthesizing high-quality grasps for objects that need to be held and manipulated in a specific way, characterized by a prespecified set of contact constraints to be satisfied. Due to the multimodal nature of typical grasp quality measures, approaches that resort to local optimization methods are likely to get trapped into local extrema on such a problem. An additional difficulty is that the set of feasible grasps is a highly dimensional manifold, implicitly defined by a system of nonlinear equations. The proposed procedure finds a way around these issues by focusing the exploration on a relevant subset of grasps of lower dimension and tracing this subset exhaustively using a higher-dimensional continuation technique. A detailed atlas of the subset is obtained as a result, on which the highest quality grasp, according to any desired criterion, or a combination of criteria, can be readily identified. Examples are included that illustrate the application of the method to a three-fingered planar hand and to the Schunk anthropomorphic hand grasping different objects, using several quality indices.