How this calculation works
Construct the quotient graph of connected level-set components of a piecewise-linear scalar field on a closed oriented triangular surface.
Reeb(f)=M/~, where p~q exactly when f(p)=f(q) and p,q belong to the same connected component of that level set. Graph cycle rank is E−V+1 for a connected graph, counting parallel arcs.A worked example
The oriented tetrahedral surface with vertex values 0,1,2,3 has one connected level component at every regular height. After suppressing regular degree-two events, its Reeb graph has two nodes, one arc and cycle rank zero.
Good to know
Connected oriented closed triangular two-manifold, 4–60 vertices/≤120 faces, distinct finite vertex scalar values (no silent random tie perturbation). Build critical-level components and connectivity of open regular slabs by exact combinatorial linear interpolation; construct quotient incidence and suppress regular degree2 nodes. Preserve graph loops and parallel arcs. No automatic Morse simplification, nonmanifold mesh or tied-value plateaus. Higher complexity; independent fixtures required before selection.
Reference: Hajij and Rosen, An Efficient Data Retrieval Parallel Reeb Graph Algorithm (opens in a new tab) ↗
Enter a closed triangular manifold
Supply oriented triangles using shared vertex labels and one finite scalar value for every vertex. Each edge must belong to exactly two faces with opposite induced orientations. The triangles must form a connected surface without boundary, and the neighborhood of each vertex must have a circular link. Edge incidence alone does not exclude every nonmanifold vertex, so link validation is also required.
The scalar field is defined between vertices by linear interpolation within each triangle. Its values need not equal geometric height because the input is combinatorial and does not require three-dimensional coordinates. Distinct vertex values are mandatory. The calculator does not silently perturb ties, since a perturbation changes plateau topology and can create or remove events that were absent from the supplied field.
Compare this with the Triangle mesh plane section calculator with contour loops. Existing mesh section returns contours for one plane. Reeb graph collapses every connected level-set component across the entire supplied piecewise-linear scalar field, tracking component splits/merges and graph cycles. It is not just a contour tree assumed on a genus-zero surface.
Understand what the quotient preserves
At a fixed scalar level, take all points of the surface having that value and separate them into connected components. Collapse each such component to one point. As the level changes, components persist, appear, disappear, split or join, forming the Reeb graph. This construction tracks level-set connectivity rather than simply the number of vertices below a threshold.
A connected surface can produce several disconnected level components at one value. On a torus, a level component can split into two and later rejoin, creating a cycle in the quotient graph. A sublevel-set merge tree records only component merges and cannot retain that split-and-rejoin structure. Treating a general Reeb graph as a contour tree would therefore discard information the calculator is intended to preserve.
Assemble regular slabs and event levels
Sort the distinct vertex scalar values. Between consecutive values there is no vertex event, so a midpoint level provides the combinatorial connectivity of the entire open slab. Each crossed triangle contributes a segment joining two crossed edges. Joining those segments through shared edges identifies the regular level components and the arcs that persist across the slab.
At each vertex level, compute level connectivity with exact combinatorial incidence, including the equal-level vertex and intersections on edges spanning the level. Attach every open-slab component to the event components approached from below and above using limiting triangle incidence. Attachments cannot be guessed solely from matching component counts. Preserve separate arcs even if they share the same pair of event nodes; they can encode a genuine cycle.
Check the tetrahedral default
The default has four triangular faces forming an oriented sphere. Its four vertices receive scalar values zero, one, two and three. A regular level below one cuts a triangular loop around the minimum vertex. Between one and two the cross-section is a connected quadrilateral loop. Above two it is again a triangular loop, now surrounding the maximum vertex.
Each regular level therefore has exactly one connected component. The intermediate vertex events have degree two in the quotient and are suppressed as regular nodes. The final graph contains the minimum and maximum joined by one arc. Its connected cycle rank is one minus two plus one, which is zero. This independent geometric reasoning tests event suppression without relying on the same graph-building implementation.
Use a torus to test retained cycles
The tetrahedron verifies the simplest sphere case but cannot detect accidental loss of a torus loop. A stronger fixture uses a periodic triangular torus and a generic tilted height function with distinct vertex values. One can independently track its regular cross-section components or compare against a trusted Reeb implementation. The expected split and rejoin must remain visible as two distinct graph arcs.
For a graph with two parallel arcs between the same saddle nodes, those arcs count separately in E. Collapsing them into a simple adjacency set changes the cycle rank and destroys the topological answer. Save an edge list with arc identities rather than only a boolean adjacency matrix. The graph is a multigraph, and a valid implementation must maintain that representation through regular-node suppression.
Read the surface-to-graph illustration
The illustration pairs a toroidal surface concept with a graph containing a split, two parallel routes and a later join. Moving upward through scalar levels corresponds to moving upward through the graph. A branch represents an entire connected family of level curves, not a single mesh edge or a shortest path drawn on the surface.
The scalar spacing of graph nodes can help show event order, but the drawn horizontal arc positions have no intrinsic metric meaning. Likewise, the graph does not retain all geometric lengths, angles or areas of the original surface. Its purpose is to summarize how connected level components evolve. Two geometrically different surfaces and fields can share the same Reeb graph without being interchangeable as geometric models.
Keep certification and scope separate
Accepted meshes contain four through sixty vertices and at most one hundred twenty triangles. The calculator rejects boundary, disconnected, nonorientable or nonmanifold input under this page’s contract. It also rejects tied vertex values rather than claiming to solve the more complicated plateau case. These restrictions define a tractable explicit algorithm and do not imply that Reeb graphs are undefined for broader classes of spaces.
No persistence simplification or automatic cancellation of small branches is performed. A tiny scalar difference can encode a real combinatorial event, so deleting it would require an additional user-selected approximation rule. The returned graph describes the exact piecewise-linear incidence under the entered distinct values; floating scalar order must still be numerically resolvable. Use independent sphere and torus fixtures before treating a complex edited graph as validated topology.
A few questions, answered
Is a Reeb graph always a tree?
No. A torus field can create a graph cycle through a split and later rejoin.
Why reject tied vertex values?
Plateaus need additional event handling; silent perturbation would change the entered problem.
Do parallel arcs count separately?
Yes. They can encode a topological cycle and must be retained.
Are 3D coordinates required?
No. Triangle connectivity and a piecewise-linear scalar value at each vertex determine this quotient construction.