Shapes & spaces

Harmonic mesh parameterization calculator with a unit circle boundary

Flatten an oriented triangular disk with uniform positive barycentric weights and its ordered boundary equally spaced on the unit circle.

Your numbers

One comma-separated row per line.
One comma-separated row per line.

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

Flatten an oriented triangular disk with uniform positive barycentric weights and its ordered boundary equally spaced on the unit circle.

THE FORMULAdeg(i)uᵢ−Σ_{j interior neighbor i}uⱼ=Σ_{j boundary neighbor i}uⱼ; boundary u_bk=(cos(2πk/m),sin(2πk/m)).

A worked example

The default eight boundary vertices map to an equally spaced unit octagon, and the single interior vertex maps to the origin with zero linear residual.

Good to know

Connected oriented edge-manifold disk mesh, 3–100 vertices, 1–200 triangles, one ordered boundary cycle containing exactly the mesh boundary. Uniform positive edge weights and equally spaced unit-circle boundary only. Euler, boundary, solve residual and flattened face-orientation checks; not conformal or area preserving.

Flatten using uniform positive weights

A mesh parameterization assigns a planar coordinate pair to every spatial vertex while preserving face connectivity. This calculator fixes the boundary on a unit circle and solves for interior coordinates as averages of their neighbors. Every mesh edge receives the same positive barycentric weight, making the precise weighting convention explicit.

The output is a coordinate map for the supplied triangulation, not a new three-dimensional surface or a mesh simplification. Spatial edge lengths do not appear in the uniform-weight equations. Two meshes with identical connectivity and boundary order can therefore receive the same planar map even when their original geometric shapes differ.

Harmonic surface mesh parameterization worked example with fixed boundaryConvex unit-circle rimInterior = neighbor meanCenter maps to origin
Scroll across to see the full diagram.
The default eight boundary vertices map to an equally spaced unit octagon, and the single interior vertex maps to the origin with zero linear residual.

Compare this with the Cotangent Laplacian calculator from a triangle mesh. Solve a disk mesh's interior planar embedding under a supplied convex boundary,not merely assemble its Laplace operator.

Supply an oriented disk and its boundary order

Enter spatial vertices and oriented triangular faces using zero-based indices. Then list the boundary vertex labels in consecutive order around the single boundary cycle. Each boundary edge must appear once in that cycle, and the supplied list must match the entire mesh boundary rather than a chosen subset of exposed edges.

The mesh must be connected, have disk Euler characteristic one and satisfy the supported edge-manifold orientation checks. Holes, multiple boundary components, duplicate triangles, degenerate faces and isolated vertices are rejected. Reversing the whole boundary order can reverse the planar orientation consistently; a scrambled order is not equivalent and can cause a failed map.

Follow the unit octagon example

The default mesh has eight boundary vertices surrounding one interior vertex. In the supplied cycle order, those boundary vertices are placed at equal angular steps around the unit circle. The center vertex is adjacent to six boundary vertices whose coordinate vectors sum to zero, so its uniform neighbor average is the origin.

The result contains one interior vertex, a zero linear residual and nonzero consistently oriented planar triangle areas. Notice that boundary vertices are equally spaced by cycle position, not by original edge length. This deliberate convention makes the map easy to reproduce but does not preserve the lengths of the original square-grid boundary segments.

Solve two discrete harmonic systems

For each interior vertex, its degree times its coordinate equals the sum of neighboring coordinates. Unknown interior neighbors contribute matrix entries, while fixed boundary neighbors contribute to the right-hand side. The same matrix is used for the horizontal and vertical coordinate solves, so the two scalar systems determine the complete planar map.

This is a discrete harmonic or barycentric condition with uniform positive weights. It differs from cotangent-weight harmonic parameterization, whose weights depend on triangle angles and can have different signs or distortion behavior. The calculator does not switch between weighting schemes automatically; its equations and reference boundary remain fixed and visible.

Check residual and face orientation

The residual measures the largest discrepancy between an interior coordinate times its degree and the sum of its neighbor coordinates. A small residual indicates that the discrete harmonic equations were solved accurately. It does not measure how well lengths, angles or areas from the original surface were preserved.

The planar signed double area of every triangle is checked for nondegeneracy and consistent orientation. The smallest absolute double area is reported as a useful warning scale for narrow mapped triangles. A flipped or unresolved degenerate face causes rejection rather than being returned as a successful flattening simply because the linear solver converged.

Understand distortion and boundary effects

Fixing a convex circular boundary helps produce an embedding under the supported disk assumptions, but it forces the original boundary into a new shape. Interior coordinates respond to that constraint and to connectivity. Local angles and areas can change substantially, even when every mapped triangle retains the expected orientation.

The method is not advertised as conformal, equiareal or isometric. Texture coordinates produced this way may stretch or compress a pattern, particularly near an unevenly sampled boundary. If preserving a particular geometric quantity matters, compare that quantity explicitly or choose a parameterization objective designed to control it rather than inferring preservation from harmonicity.

Interpret maps under relabeling and rescaling

Vertex coordinates in the result follow the original index order, so they can be paired directly with the original face list. Changing which boundary vertex appears first rotates the circular placement, while reversing the ordered cycle can reflect the map. Such rigid planar changes need not alter the underlying distortion pattern.

Uniformly rescaling the original spatial coordinates leaves this connectivity-based map unchanged, provided the mesh stays within validation thresholds. Editing connectivity, boundary order or the number of boundary vertices can change it. The guarantee is a checked numerical map for the entered disk and fixed convention, not a universal flattening for arbitrary surface topology.

A few questions, answered

Where is the boundary placed?

At equally spaced points of the unit circle in the entered cyclic order.

Are cotangent weights used?

No. Positive uniform neighbor weights define this initial harmonic embedding.

Is the map conformal?

No. Harmonic barycentric coordinates do not guarantee preservation of angles or areas.

Why require disk topology?

The sole boundary cycle,connectedness and Euler/link checks support the planar disk embedding model.

Find your calculator

Start typing to explore the library.