Quote:Original post by nullsquared
If we calculate z=f(x,y) as a heightfield, we can just intersect it with the plane z=0 and the intersections give you the exact curve(s). This actually gives incredibly nice results for practically no effort:[...]
Do you mean that you,
1 - create a triangulated heightfield from your data
and then
2 - compute triangle-plane intersections to get a collection of line segments which approximate you curve?
If so, then what you're doing is mathematically identical to the triangle equivalent to marching squares (It is sometimes called "marching triangles," but a different surface triangulation algorithm is also sometimes called by this name too).
The only difference is that explicitly creating all the data structures necessary to store a triangle mesh in memory are somewhat costly, as are the general-purpose triangle-plane intersection functions (relative to the special case computed by the algorithm I referred to).