Techniquecore
Energy-based surface fairing
Also called variational surface fairing, thin plate energy fairing.
Smooths a B-spline curve or surface by minimising a quadratic energy such as the thin plate energy plus a fitting term, so it is fair and close to the data.
Energy-based fairing makes a curve or a surface smooth by choosing its control points to minimize an energy. The energy measures how much the surface bends, and a second term, if there is one, measures how far it is from the data. The usual choice is the linearized thin plate energy . It is a quadratic form in the control points, so with linear constraints, such as fixed boundary curves or points to interpolate, the best control points solve one linear system. That is the main reason for its use: the fairest surface in this sense costs one sparse linear solve. The nonlinear energies of minimum variation surfaces give better shapes at a much higher cost.
In plain words
Think of a thin sheet of steel. Pin it at some points, or clamp its edges, and it settles into the shape that bends least. That shape is smooth and calm, with no bumps that the pins do not force. Energy-based fairing imitates this sheet. It writes down a number that is large when the surface bends a lot, and it moves the control points to make that number as small as possible, while the surface still meets the conditions the designer set. If the surface must also follow measured points, a second number counts the misfit, and a weight says how much smoothness may cost in accuracy. Because both numbers are simple sums of squares, the best control points come from one system of linear equations.
When it applies
Use it when a surface is given by a control net and some linear conditions, and the shape between the conditions is free: a patch with fixed boundary curves, a surface through scattered points, a surface fitted to noisy measured points, or a surface whose control net was edited by hand and has bumps. It applies to B-spline and Bezier curves and surfaces, to subdivision surfaces and, in discrete form, to meshes. It needs a parametrization that is not too far from uniform in arc length, since the linearized energy measures parameter derivatives, not curvature.
The template
The energies. Let be a tensor product B-spline surface on . The membrane energy and the linearized thin plate energy are
The true bending energy of a thin plate is , with the principal curvatures . For a height field with small slopes, , which is . For a parametric surface is close to the bending energy only where the parametrization is close to an isometry. The fitting term for data points at parameters is .
FAIR(knots, degrees, data Q_k at (u_k, v_k), weights λ, α, β, constraints C p = r)- 1
G_a ← the Gram matrix of the a-th derivatives in u, (G_a)_{ik} = ∫ N_i^{(a)} N_k^{(a)} du, for a = 0, 1, 2; H_a the same in v - 2
K ← α (G_1 ⊗ H_0 + G_0 ⊗ H_1) + β (G_2 ⊗ H_0 + 2 G_1 ⊗ H_1 + G_0 ⊗ H_2) - 3
A ← the collocation matrix, A_{k,(ij)} = N_i(u_k) M_j(v_k) - 4
M ← AᵀA + λ K; b ← AᵀQ, one column for each coordinate - 5
solve [M Cᵀ; C 0] [p; μ] = [b; r] for each coordinate ▷ hole: a sparse symmetric solver - 6
return the surface with the control net p
Line L2 is the energy matrix of , and line L4 adds the fitting term. The constraints are any linear conditions: fixed control points, points the surface must interpolate, or tangent conditions along a boundary. Line L5 is the system of the KKT conditions, with Lagrange multipliers . With no constraints it is , and with fixed control points only, it is restricted to the free points. Each coordinate is solved with the same matrix, so one factorization serves all three.
Theorem 1 (the energies are quadratic forms). For each coordinate, write for the vector of that coordinate of the control points. Then with , and is symmetric and positive semidefinite. The same holds for with .
Proof. The surface is linear in the control points, and so are its derivatives: . For one coordinate,
because the integrand is a product of a function of and a function of . The matrix with the entries is the Kronecker product . The terms with and give and in the same way, and the sum over the coordinates gives and the rest. Each Gram matrix is symmetric, so is symmetric. Since for every , is positive semidefinite.
The kernel of is the set of nets with , that is with , which are the nets of the affine maps . So alone does not fix a surface: the constraints or the data must rule out the affine motions.
Theorem 2 (the minimizer solves a linear system). Let with , so that the objective is . A vector with minimizes over if and only if there is a with . If has full row rank and for every with , the system of line L5 is nonsingular, and the minimizer is unique.
Proof. Every feasible point is with , and
If , the first term is , and the second is at least because is positive semidefinite (Theorem 1, and is a Gram matrix). So is a minimizer. Conversely, if is a minimizer, then for each with the function has its minimum at , so its derivative there is . Hence is orthogonal to the null space of , so it is in the range of , which gives . For the last claim, let and . Then , so , then , and because has full row rank.
Worked example. Take a bicubic Bezier patch, so each and is a cubic Bernstein polynomial on , with the control points . Fix the twelve boundary points, with the heights along each edge, and let the four inner points be free. Use alone (, , ). The and coordinates of the net are affine, so they have zero energy and stay on the grid, and only the four inner heights are unknown. For the cubic Bernstein basis has the entries , and is
The system of line L5 has the same right side in each row, and its solution is . On the line where the four inner heights are equal to , the energy is , with its minimum at . The obvious guess gives , and gives . At the centre the fair patch has height , against for . The fair surface lifts the inner points a little above the edge points, to round off the top, as a bent plate does.
Classic examples
- Variational design. Welch and Witkin show the user a surface with no fixed control points: within the constraints that the user places, the shape is the one that minimizes a smoothness energy, so the user edits by constraints and not by control points.
- Deformable finite elements. Celniker and Gossard build curve and surface elements that deform to minimize an energy functional under geometric constraints and loads that the user controls.
- Data dependent energies. Greiner keeps the energy quadratic but measures the derivatives with the help of a reference surface, so that the functional is a simplified form of the geometric thin plate energy and is still cheap to minimize.
- Smoothing splines. For curves, is the smoothing spline functional, and its minimizer over all functions is a natural cubic spline.
- Mesh fairing. On a mesh, the cotangent Laplacian gives discrete membrane and thin plate energies, and implicit fairing solves the same kind of sparse system.
Variations
- Other quadratic energies. Third derivative energies, such as , measure the change of curvature and are still quadratic.
- Hard and soft constraints. A condition can be a row of , which holds exactly, or a term of the fitting sum, which holds approximately with a weight.
- Fairing within a tolerance. Minimize the energy subject to . The constraints are then quadratic inequalities, and the problem is a convex program, not a linear system.
- Nonlinear energies. The exact thin plate energy and the curvature variation energy of minimum variation surfaces depend on the geometry, not on the parametrization, and need nonlinear optimization.
- Local fairing. Minimize the energy over the control points of one region only, with the rest fixed, to remove a local defect.
Pitfalls
- The measure is a design criterion. No energy defines fairness. A minimum of is the fairest surface only in the sense of , and designers judge the result by reflection lines and curvature plots, which can disagree with the energy.
- Parametrization dependence. measures parameter derivatives. A surface with uneven parameter speed is faired toward even speed, which can move the surface in ways that are not wanted, and the same shape with another parametrization gives another result.
- Too few constraints. Without data or enough fixed points the affine nets have zero energy, and is singular on the null space of .
- Weights. The result depends on , and . A large weight on smoothness pulls the surface away from the data, and a small one keeps the noise. The weights also depend on the units of the data.
- Shrinking. With the membrane energy alone, the surface pulls inward like a soap film and flattens bumps that should stay.
- Dense assembly. The matrix is sparse and banded for B-splines, with bandwidth set by the degrees. Assembling it as a dense matrix wastes time and memory for large nets. Use a sparse Cholesky factorization or the conjugate gradient method.
Exercises
- Show that for a cubic Bezier curve with control values on , with and .
- In the worked example, verify from the matrices , and , and explain by symmetry and Theorem 2 why the four inner heights of the minimizer are equal.
- Show that the bilinear surface written as a bicubic Bezier patch minimizes among all bicubic patches with its boundary. Hint: check that and compute the derivative of along any change of the inner points.
- Let the constraints fix some control points, with the indices of the free points and those of the fixed ones. Show that the system of line L5 reduces to , and that is positive definite when the minimizer is unique.
References
- Günther Greiner, Variational design and fairing of spline surfaces, Computer Graphics Forum 13(3), 143 to 154, 1994, fairness functionals as simplified thin plate energies for parametric surfaces, made quadratic by a reference parametrization
- George Celniker and Dave Gossard, Deformable curve and surface finite-elements for free-form shape design, SIGGRAPH 1991, 257 to 266, surfaces that minimize a stretching and bending energy under geometric constraints and loads
- Welch and Witkin 1992, free-form surfaces whose shape, within the constraints set by the user, is fixed by a smoothness criterion
- Henry P. Moreton and Carlo H. Séquin, Functional optimization for fair surface design, Computer Graphics 26(2), 167 to 176, 1992, the comparison of the thin plate energy with the curvature variation functional
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W3 standard |
|
Tag 9P66FN Edit this page History Report an error Markdown