Original Post
I am trying to understand the Polygon Reduction by stan Melax described in the paper Polygon Reductionusing ProgressiveMesh
Algorithm seems to be fairly straighforward, except the cost factor calculation, used for deciding the vertex to be collapsed.
cost(u,v) = ||u-v|| * max{ min{(1-dot(f.normal,n.normal))/2}
(Here u, v are the vertices (v to be collapsed to u), f.normal is the face normal of each triangle having the common vertex u and n.normal is normal of each triangle sharing the edge uv. Inner function (min) will loop for each triangle sharing edge uv and the outer function (max) will loop for each triangle sharing the vertex u).
I didn't understand the expression (1-dot(f.normal,n.normal)). why dot product is used and why he is subtracting dot product from 1. and also why he is taking the max in the outer loop. It should be minimun function.