Expand description
Fairing: move chosen vertices to the smoothest surface their fixed surroundings allow.
Smoothing (crate::smooth) relaxes vertices a step at a time and never
arrives anywhere in particular. Fairing solves for the arrival: the
free vertices are placed where the discrete Laplacian (harmonic, a
membrane) or bi-Laplacian (biharmonic, a thin plate) of the surface
vanishes, with every other vertex held fixed. The biharmonic solution
also matches the fixed surface’s first derivatives across the border,
which is what makes a filled hole continue its surroundings tangentially
instead of meeting them at a crease. This is the fairing step of Liepa
(2003) and of CGAL’s Polygon_mesh_processing::fair.
§The system
With symmetric edge weights w_ij the Laplacian L (L_ij = w_ij,
L_ii = -sum_j w_ij) is symmetric, and with a positive diagonal mass M
the biharmonic conditions (L M^-1 L x)_i = 0 for the free vertices F
read
(L_{:,F})^T M^-1 L_{:,F} x_F = -(L_{:,F})^T M^-1 L_{:,C} x_Cwhose matrix is a Gram matrix: symmetric positive definite whenever each
connected group of free vertices touches a fixed one. It is solved for
each coordinate by axiolid_numeric::conjugate_gradient; the harmonic
case solves -L_FF x_F = L_FC x_C the same way. Only rows of L at the
free vertices and their neighbours enter, so the cost follows the faired
region, not the mesh.
Weights are computed once, on the positions before fairing.
FairingWeights::Cotangent uses (cot a + cot b) / 2 with the
barycentric (one-third) vertex area as mass, the standard linear finite
element discretisation; FairingWeights::Uniform uses unit weights and
the valence as mass (Kobbelt’s umbrella operator), so it ignores the
shape of the triangles and also works on polygonal faces.
§Exactness
Rows of L sum to zero, so every affine function of position is
reproduced: fixed vertices that all lie in one plane keep the free ones in
it, up to the solver tolerance, and in an axis-aligned plane exactly.
Structs§
- Fair
Options - Options of
fair. - Fair
Report - What
fairdid.
Enums§
- Fair
Error - Why
fairrefused. On every refusal the mesh is unchanged. - Fairing
Order - Which derivative vanishes on the faired region.
- Fairing
Weights - Edge weights of the discrete Laplacian.
Functions§
- fair
- Fair the given vertices of a mesh in place; every other vertex is fixed.