Input: M=(V,F), features G=(E_f,V_c), epsilon_d, p=4, l_target
1. Build bijective shell S around M using progressive envelope inflation (TetWild-style) + feature graph projection
2. Coarsen S to target length while preserving topology & intersection-free
3. Extract coarse linear surface Ms = shell outer boundary
4. Fill domain bounded by Ms with linear tets using fTetWild (union of shell interior)
5. Elevate linear tets to Bézier degree p+1=4 (volume uses recursive tuple_gen ordering)
6. Optimize curved control points:
min E_geom (Hausdorff) + λ E_distortion (AMIPS)
s.t. det J > δ >0, no interpenetration, feature constraints
7. Build bijective correspondence f: M → ∂M_out via barycentric + shell parameter
Return: (lagr, cells, complete_cp, mV, mbase, mtop, mF)
Bézier Tet Formalism
Degree p tetrahedron with barycentric λ=(α,β,γ,δ), Σλᵢ=1:
$$ \mathbf{x}(\lambda)=\sum_{i+j+k+l=p} \binom{p}{i,j,k,l} \alpha^i\beta^j\gamma^k\delta^l \; \mathbf{c}_{ijkl} $$
Jacobian J(λ)=[∂x/∂α,∂x/∂β,∂x/∂γ]∈ℝ³ˣ³. Validity requires positivity on control lattice sufficient condition: Bernstein coefficients of det J >0. We use:
$$ \det J(\lambda)=\sum_{|I|=4p-3} b_I B_I^p(\lambda) $$
If min_I b_I >0 ⇒ element valid. We optimize to enforce b_I ≥ ε.
Shell & Feature
Shell S is offset surfaces S±ε around input using signed distance d(x). We maintain ||x_shell - x_proj||∞ ≤ ε_d, preserve feature lines by snapping to feature graph G, support constraint points P with barycentric (P_fid,P_bc) allowing distance bound where user wants. Topology check via progressive envelope expansion with exact predicates ensures shell never self-intersects.
Dihedral heuristic --feature-dihedral_threshold auto-tags features if H5 not supplied. Corners junction of ≥3 feature edges auto-inferred. Features frozen during optimization.
Curved Optimization
$$ E = w_d\,E_{distance}+w_q\,E_{AMIPS}+w_b\,E_{barrier} $$
E_distance = Σ_q||x(q)-π_M(x(q))||² where Q sampled Gauss-Lobatto points; π_M closest point onto input. E_AMIPS = Σ_T ∫_{T̂} ||J||²_F/(det J)^{2/3}. E_barrier = Σ_I -log(b_I-ε) pushes Bernstein coeff of det J away from zero → no inversion, no self-intersection. Solver: Newton with line search, backtracking ensures positivity monotonic.
Bijective Map & Transfer
Shell gives correspondence: any p∈M maps to q∈∂M_out via normal shoot within tube. Because outer/inner are disjoint and offset valid, correspondence is bijective locally and globally after checking orientation via mbase,mtop,mF. Enables texture UV transfer, Dirichlet data pullback, displacement fields (teaser shows elasticity simulation on coarse tet matches dense surface visually).