In medical imaging or computational biology, it is required to reconstruct a surface from contours in cross sections for visualization and further processing. We propose a method to generate a surface which is smooth enough and exactly passes through contours in each cross section. For smoothness, we first define an energy of the surface using the gradient of the normal vector. Then, we express the surface using a level set function and assign values of level set function on each cross section to make the surface exactly passing through contours. Finally, we get an energy minimization problem with constraints, which can be solved using the augmented Lagrangian method and the alternating direction method. The solution of the minimization problem is the surface which we look for. Implementation of the algorithm and numerical experiments are presented.