Construction of contour trees in 3D in O(n log n) steps

We outline an O(n log n) algorithm for computing the contour trees for simplicial meshes with n elements in 3D. As a byproduct we describe an O(nlog n) algorithm for “resolution” of singularities of piecewise-linear functions in 3D (i.e., transforming singularities into simple Morse-like ones by subdividing the mesh).