Convex optimization for shape manipulation of multidimensional crystal particles