Optimization problems in planar geometry