Polygonal approximation by the minimax method