  Controlling the shapes of surfaces provides a novel way to direct
self-assembly of colloidal particles on those surfaces and may be useful for
material design. This motivates the investigation of an optimal control problem
for surface shape in this paper. Specifically, we consider an objective
(tracking) functional for surface shape with the prescribed mean curvature
equation in graph form as a state constraint. The control variable is the
prescribed curvature. We prove existence of an optimal control, and using
improved regularity estimates, we show sufficient differentiability to make
sense of the first order optimality conditions. This allows us to rigorously
compute the gradient of the objective functional for both the continuous and
discrete (finite element) formulations of the problem. Moreover, we provide
error estimates for the state variable and adjoint state. Numerical results are
shown to illustrate the minimizers and optimal controls on different domains.
