# Analytic Form Fitting in Poor Triangular Meshes
## 1 Introduction
### Context  
Point samples of a two-manifold (surface) in 3D are achieved by contact, ultrasound or optical scanning. Under Nyquist-Shannon conditions of this geometrical point cloud information, topological (i.e., connectivity) information may be inferred. A widely used result of the topology inference is the triangular mesh surface approximation. This manuscript addresses the next step of shape inference, namely the fitting of a analytic form \(g()\) to a subset of the triangular mesh \(M\).  
This manuscript is concerned with triangular meshes whose facets strongly depart from equilateral, isotropic, and homogeneous size conditions. The reason for this choice is that in many cases, mesh conditioning is not only labor-expensive but is produces massive triangle sets. Fitting analytic form to heavy datasets is prohibitively slow for many industrial applications.  
A strong demand exists in industrial applications for planar, cylindrical, conical and spherical forms, identified in low-quality triangle sets. Therefore, this manuscriptaddresses those surface types, tessellated with such low-quality triangles. The implicit form \((g(x,y,z)=k)\) is pursued. In this manuscript, \(g()\) equally notes the parametric or implicit forms, as well as the defining feature set of the form, as follows:  
* For cylinders: axis pivot point \(p_{0}\), axis direction \(\vartheta\), radius \(R\).
* For cones: axis pivot point \(p_{0}\), axis direction \(\vartheta\), cone angle \(\gamma\).
* For spheres: center pivot point \(p_{0}\), radius \(R\).  
This manuscript addresses the following problem:  
**Given:**  
* \(M(\mathcal{T},\mathbf{P})\): triangular mesh representing a shell with manifold properties.
* \(t_{s}\in\mathcal{T}\): seed triangle (selected by the user).
* \(\widehat{\mathcal{T}}\): type of analytic form (selected by the user from the options cylinder, sphere, and cone).
* **Goal:**
* \(S\): largest connected subset of \(M\), formed by triangles from \(M\), containing \(t_{s}\) and fitting the analytical form of \(\widehat{\mathcal{T}}\).
* \(g():\) analytic form of the chosen primitive, fit to subset \(S\).  
where the analytic form is expressed by the identified parameters in (a)-(c) above.  
It is important to note that the continuity level (\(C^{0}\), \(C^{1}\) or higher) at the borders \(\partial S\) triangle subset \(S\) and \(M-S\) has a dramatic impact on the decoupling of solutions for items (i) and (ii) above. If the surface \(M\) has only \(C^{0}\)-continuity at border \(\partial S\), this fact determines \(S\), without influence from the fitting stage. Then, the fitting of \(g()\) proceeds in real time. On the other hand, if \(M\) presents continuity \(C^{1}\) or higher at border \(\partial S\), there is a codependency between \(S\) and \(g()\). \(S\) can be extended only as far as it produces a good quality fit \(g()\). Low-quality \(g()\) fitting indicates that the subset \(S\) includes mistaken triangles. Those triangles must be eliminated from \(S\), other triangles might be included, and a new guess for \(g()\) is computed. This iteration is obviously more expensive than the one in which identification of \(S\) does not depend on the quality of \(g()\) fitting.  
This manuscript is organized as follows: Section 2 reviews the existing literature and argues our claim for novelty in our initiative. Section 3 explains the methodology followed. Section 4 conveys the results of our implementation and compares it in some aspects against similar competitor approaches. Section 5 concludes the manuscript and discusses relevant future endeavors.