Shapes & spaces

Triangle mesh quadric error simplification calculator with edge collapse history

Simplify a triangular surface by admissible greedy quadric-error edge collapses and inspect the complete collapse history.

Your numbers

One row per point or face; use zero-based indices where requested.
One row per point or face; use zero-based indices where requested.
Use the conventions and bounds explained below.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Simplify a triangular surface by admissible greedy quadric-error edge collapses and inspect the complete collapse history.

THE FORMULAQ_v=Σ incident plane p pᵀ; edge cost [x,1]ᵀ(Q_u+Q_v)[x,1].

A worked example

The oriented octahedron default starts with eight faces. Collapsing edge 0–2 to (0.5,0.5,0) produces six faces, with accumulated plane-quadric cost approximately 4/3.

Good to know

4–40 used spatial vertices and 4–80 consistently oriented manifold triangles; target at least 4 faces. Boundary vertices locked, link-condition, duplicate-face and local normal checks. Greedy heuristic, not minimum global error; no Hausdorff or global self-intersection-free guarantee. Inaccessible targets return an honest stop status.

Reducing a surface rather than a curve

A triangle mesh represents a piecewise planar surface using spatial vertices and triangular faces. Simplification reduces its face count while trying to preserve important geometric structure. An edge collapse merges two adjacent vertices, removes their shared triangles and reconnects the remaining incident triangles. That operation differs from deleting a point along an ordered polyline.

A smaller mesh can be useful for display, storage or a preliminary geometric model. However, fewer faces do not automatically preserve volume, curvature, silhouette or collision behavior. This page exposes the local error criterion and accepted history so you can inspect what changed, rather than treating a requested face count as a universal measure of quality.

Triangle mesh quadric error simplification calculator with edge collapse history worked example8 original faces6 retained facesEdge 0–2Q = 4/3
Scroll across to see the full diagram.
The oriented octahedron default starts with eight faces. Collapsing edge 0–2 to (0.5,0.5,0) produces six faces, with accumulated plane-quadric cost approximately 4/3.

Compare this with the Minimum vertex polyline simplification calculator with a distance tolerance. Reduce a triangular surface mesh through admissible edge collapses and accumulated plane quadrics; the polyline tool selects an original-vertex subsequence under a chord tolerance.

Supplying a valid mesh

Enter vertex coordinates and face rows containing three distinct zero-based vertex indices. Every declared vertex must belong to a face. Duplicate triangles and degenerate triangles are rejected. Adjacent triangles must orient their common edge in opposite directions, and edge and vertex links must have the manifold structure needed for the supported collapse rules.

Boundary vertices are locked to avoid silently moving or erasing open edges. This can make a target unreachable, particularly for a small open patch. A stop above the requested count is a valid algorithm status, not a successful target reduction. The result reports both counts and a separate reached-target flag to keep that distinction explicit.

Building the plane quadrics

Each original face defines a unit-normal plane. The squared signed distance of a trial position to that plane can be written as a quadratic form in homogeneous coordinates. Adding the incident plane forms gives a quadric for each original vertex. When two vertices merge, their accumulated quadrics add rather than forgetting the planes already removed.

For a candidate edge, the solver tries the quadric-minimizing position when its small linear system is resolved, plus the two endpoints and midpoint as fallbacks. The smallest admissible cost becomes that edge’s candidate. Plane normals are normalized, so this cost is a sum of squared distances to planes, not raw equation coefficients or a directly measured surface-to-surface distance.

Which collapses are admissible

The link condition checks the common-neighbor structure around an edge before it is collapsed. Candidate faces must avoid duplicates and degeneracy, and their new normals must remain sufficiently aligned with their previous normals. These tests prevent several obvious local failures, including inverted triangles. Boundary locking adds a further geometric restriction on eligible endpoints.

They do not certify the global embedding. A locally acceptable new triangle could intersect a distant part of a complicated mesh. Likewise, a low quadric cost does not bound Hausdorff distance to the original surface. The limitation is shown with the result because using this output as a collision-safe manufactured model would require additional validation.

Following the octahedron example

The default mesh has six vertices on the positive and negative coordinate axes and eight consistently oriented triangular faces. Its surface is closed, so boundary locking removes no initial candidates. The first selected collapse merges vertices zero and two at their midpoint, (0.5,0.5,0). The two triangles sharing that edge disappear.

The remaining six triangles form the returned mesh, and the accumulated cost of this collapse is approximately 1.3333333333. That number is not a percentage of shape error. It is the selected quadratic objective under the original face-plane model. A geometric screenshot or volume comparison would describe other properties and could rank alternative collapses differently.

Reading the history and indices

The history reports the kept and removed original vertex IDs, the selected position, cost and remaining face count after each accepted collapse. Final face indices refer to the compacted final vertex list. The original-vertex-ID list provides the mapping between those compacted indices and the surviving IDs used by the history.

The algorithm is deterministic for fixed input order and ties, but a symmetric mesh may have several equal-cost choices. Reordering equivalent vertices can therefore produce a different valid simplification. Compare the objective, constraints and final topology rather than assuming identical coordinates are required from every implementation of a greedy quadric-error method.

Choosing and checking a target

Set a target no larger than the original face count and no smaller than the supported minimum. An interior collapse commonly removes two triangles, so a requested odd decrement may be inaccessible under these rules. The solver also refuses a collapse that would undershoot the target, and it stops when no remaining admissible candidate can meet it.

Inspect the result before using it downstream. Confirm whether the target was reached, review boundary restrictions and examine the collapse locations. If a downstream task depends on volume, watertightness, detailed curvature or absence of distant intersections, test those properties explicitly. The transparent stop status is preferable to silently relaxing the mesh or error constraints.

A few questions, answered

Why was the target not reached?

Boundary locking, link or normal checks, duplicate faces or face-count parity can leave no admissible collapse.

Is quadric cost a percentage of surface error?

No. It is an accumulated squared distance-to-plane objective and is not a normalized Hausdorff error.

Are final indices the original vertex IDs?

Final faces index the compacted output list. The original-vertex-ID mapping connects that list to the collapse history.

Can I assume there are no distant intersections?

No. Local admissibility checks do not certify global self-intersection freedom; inspect that property separately if needed.

Find your calculator

Start typing to explore the library.