Workpiece orientation is formulated as an optimal design problem based on a discrete approximation of design surface geometry and the kinematic capabilities of the process machine tool. The primary process application addressed is three- and four-axis numerically controlled (NC) milling, although the techniques presented may be applied to machines with more general articulation. Recent developments in applied spherical geometry are employed to formulate a nonlinear optimization problem. For three-axis milling applications, by assigning a weight to each surface normal of the discrete model corresponding to the actual area it represents, the orientation is optimized such that the angle between the normals and the milling tool axis is minimized. This formulation is augmented, for four-axis milling, to incorporate limitations of the rotational degree of freedom into the optimization formulation.