A trivial solution to the X-face ambiguity in marching cubes and other isosurface extraction algorithms
An x-face of a volumetric model has alternating green (larger than threshold v) and blue (smaller than v) values r0...r3 at its corners.
The intersection of an x-face with a trianglulated approximation of the isosurface is two edges.
There is an ambiguity as to which pair of edges should be used.
An unambiguous solution is given by the topology of the isocurve of the bi-linear interpolation (orange curve).
Hence, the correct topology choice is dictated by the value of (r0-v)*(r2-v)>(r1-v)*(r3-v).
This test may be performed for consistently each face of each cell (cube) during the construction of an isosurface mesh.