# Dual marching squares/cubes - divide or do not divide a node?

In the marching squares/cubes algorithm, how is it decided if a node in the quadtree/octree will be divided further (into 2^dimension nodes)?

It is not clear what the line represents and against what it's tested.

I can't follow the maths exactly in your linked paper but I presume the logic is the same as any error metric. For each node you can calculate an error - if you stopped subdividing at that node and just generated the surface polygons at that resolution, how bad would the result be (in terms of error difference against the real surface). You'd be calculating 'error improvement' from subdividing, where the improvement in the error is: 'total error for all the subdivided nodes' - 'error for the parent node'