# converting a triangulated surface to min-max form

Let $S$ is a triangulated surface, representing a graph of a function z(x,y) in 3D space. According to https://en.m.wikipedia.org/wiki/Piecewise_linear_function every continuous piecewise linear function can be represented in min-max form $$f(\vec x)=\min_{\Sigma\in\Pi} \max_{(\vec a,b)\in\Sigma} \vec a \vec x+b$$ If anybody knows an algorithm for conversion of the surface from triangulated form to min-max form, please help!