We present a constructive proof of Alexandrovs theorem regarding the existence of a convex polytope with a given metric on the boundary. The polytope is obtained as a result of a certain deformation in the class of generalized convex polytopes with the given boundary. We study the space of generalized convex polytopes and discover a relation with the weighted Delaunay triangulations of polyhedral surfaces. The existence of the deformation follows from the non-degeneracy of the Hessian of the total scalar curvature of a positively curved generalized convex polytope. The latter is shown to be equal to the Hessian of the volume of the dual generalized polyhedron. We prove the non-degeneracy by generalizing the Alexandrov-Fenchel inequality. Our construction of a convex polytope from a given metric is implemented in a computer program.