Minimization diagrams encompass a large class of diagrams of interest in the literature, such as generalized Voronoi diagrams. We develop an abstract perturbation theory in two dimensions and perform a sensitivity analysis for functions depending on sets defined through intersections of smooth sublevel sets, and formulate precise conditions to avoid singular situations. This allows us to define a general framework for solving optimization problems depending on two-dimensional minimization diagrams. The particular case of Voronoi diagrams is discussed to illustrate the general theory. A variety of numerical experiments is presented, which show that the proposed methodology allows the construction of customized Voronoi diagrams using off-the-shelf well-established optimization algorithms.