Practical construction of globally injective parameterizations with positional constraints

We propose a novel method to compute globally injective parameterizations with arbitrary positional constraints on disk topology meshes. Central to this method is the use of a scaffold mesh that reduces the globally injective constraint to a locally flipfree condition. Hence, given an initial parameterized mesh containing flipped triangles and satisfying the positional constraints, we only need to remove the flips of a overall mesh consisting of the parameterized mesh and the scaffold mesh while always meeting positional constraints. To successfully apply this idea, we develop two key techniques. Firstly, an initialization method is used to generate a valid scaffold mesh and mitigate difficulties in eliminating flips. Secondly, edge-based remeshing is used to optimize the regularity of the scaffold mesh containing flips, thereby improving practical robustness. Compared to state-of-the-art methods, our method is much more robust. We demonstrate the capability and feasibility of our method on a large number of complex meshes.


Introduction
Computing parameterizations of disk topology meshes is a fundamental problem in computer graphics [1][2][3][4][5]. It is a basic requirement for parameterizations to be globally injective, i.e., the parameterized boundary should be self-intersectionfree, and the parameterized triangles should be flipfree. Furthermore, in many applications, such as u-v editing, a set of vertices should be constrained to desired positions.
Generating desired parameterizations is difficult, and existing methods provide no theoretical guarantee that they develop an initial parameterization satisfying the above constraints. Techniques for constructing flip-free parameterizations with positional constraints often do not handle the intersection-free condition [6][7][8][9]. Thus, we need to optimize the intersection-free boundary or the positional constraints from the initialization. However, the non-linear intersection-free constraint is not straightforward to handle, as the intersecting boundary edge pairs usually change during optimization. We note that computing intersectionfree and flip-free parameterizations without positional constraints is a popular research topic [10][11][12][13], while optimizing the positional constraints as a soft energy may lead to self-locking situations [14,15].
Only one existing method handles all three types of constraints [16]. They take as input an initial mapping satisfying the positional constraints and violating the other two constraints, and then try to remove the intersecting boundaries and flipped triangles by optimizing dedicated penalty energies while keeping the positional constraints. In practice, complicated self-intersecting boundaries often cause the approach to fail to obtain the desired results (see Figs. 1 and 13).
In this paper, we propose a practical and robust method to compute globally injective parameterizations with hard positional constraints.
The key idea is to use a scaffold mesh to convert the globally injective constraint into the flip-free  [16] fails to generate a globally injective parameterization which satisfies the positional constraints (blue dots), whereas our method succeeds. Green lines indicate boundary edges of the input model. constraint (Fig. 3), following Refs. [11,17]. The scaffold mesh encloses the parameterized mesh, and its inner boundary conforms to the boundary of the parameterized mesh. If the overall mesh composed of the scaffold mesh and the parameterized mesh has no flipped triangles and its outer boundary is intersection-free, the boundary of the parameterized mesh is intersection-free [18]. Then, previous elegant methods for computing flip-free mappings with positional constraints can be used.
Two factors should be considered to ensure robustness in practice. Firstly, if the boundary of the parameterized mesh has intersections, it is non-trivial to generate a scaffold mesh whose inner boundary conforms to the boundary of the parameterized mesh. Secondly, after generating the scaffold mesh, the flipfree condition is applied to the overall mesh, so the scaffold and the parameterized mesh affect each other.
To handle the former, we propose a three-step process to initialize the parameterizations. After obtaining a globally injective parameterization without positional constraints, we initialize a valid scaffold mesh using constrained Delaunay triangulation (CDT) and then enforce the positional constraints on the initial parameterized mesh.
To handle second factor, two techniques are used: (i) in the initialization process, the initial overall mesh is similarly transformed to reduce the distances between the current positions of the constrained vertices and their target positions, and (ii) after the flip-free mapping computation algorithm terminates, if there are still flips, the scaffold mesh is remeshed, following Ref. [11]. Since the boundary of our parameterized mesh is not intersection-free, the CDT algorithm used by Ref. [11] cannot be used. Instead, the edge-based remeshing algorithm [19] is applied.
We demonstrate the practical robustness of our method on a large number of models (Figs. 2 and 11). Our approach is much more robust than previous methods in practice. For example, on the dataset provided by Ref. [16], our success rate is 99.8%, whereas the state-of-the-art method [16] only has a success rate of 85.8%.
On the other hand, some methods take an inverted configuration as input and try to remove the flipped elements afterwards. These include a bounded distortion mapping method [9], projection-based methods [8,35], an assembly-based method [36], penalty-based methods [37,38], and area-based methods [39,40]. However, until now, there has been no theoretical guarantee that all flips will be totally removed.

Globally injective parameterization
As well as the flip-free constraint, globally injective parameterizations also require intersection-free boundaries [18]. Tutte's embedding or other variants can theoretically guarantee global injectivity, but they lead to significant distortion. To solve the problem, some methods start from a globally injective mapping that may have high distortion, and iteratively optimize the mapping, while checking for overlaps after each step, and using a barrier function [10] to prevent overlaps. However, finding candidate pairs of overlapping elements and deciding how to handle them are time-intensive, as discussed in Refs. [11,12]. Another class of methods using a scaffold mesh to guarantee global injectivity will be described next.

Scaffolds for mapping construction
Scaffold meshes have already been used in previous work, e.g., for surface tracking [41], surface parameterization [11,17], and collision handling [42]. As noted above, the main challenge in obtaining global injectivity is to avoid collisions between any pair of non-adjacent boundary edges. Since the number of collisions is hard to estimate in each iteration, collision detection and elimination can take a lot of time, as mentioned in Refs. [11,12,43]. After introducing a scaffold mesh, the globally injective constraint can be converted to a flip-free constraint [11,18], which sidesteps the need to explicitly detect and avoid collisions. As long as the overall mesh consisting of the parameterized mesh and the scaffold mesh is flip-free, the parameterized mesh is sure to be flip-free and intersection-free. Our algorithm also uses a scaffold mesh to achieve global injectivity.

Constrained parameterization
Constructing flip-free parameterizations with positional constraints has attracted considerable research attention in recent years [7,14,16,36], but without the intersection-free constraint being considered. Many methods can be successfully applied to fixed-boundary mapping problems, thus leading to an intersection-free mapping as long as the initial boundary has no intersections [8,38,40]. However, existing methods provide no theoretical guarantee that they generate an initial parameterization satisfying the intersection-free condition, the flip-free condition, and arbitrary positional constraints. In fact, given an intersectionfree and flip-free parameterization, optimizing the positional constraints while always satisfying the globally injective condition may result in self-locking situations, as observed by Refs. [14,15]. Du et al. [16] recover a globally injective parameterization satisfying arbitrary positional constraints from a non-injective initial mapping while meeting the positional constraints. However, their method fails for many models (see Figs. 1 and 13). We also consider these constraints, but convert the intersection-free condition to a flip-free condition, leading to a higher success rate.

Inputs and goals
Given an input disk topology mesh M, we aim to compute a parameterized mesh P ∈ R 2 satisfying the following requirements: • Intersection-free boundary: the boundary of P should have no self-intersections.

Formulation
Computing globally injective parameterizations with positional constraints and the low distortion requirement can be formulated as a constrained optimization problem. Let E distortion (P) measure the parameterization distortion, B p be a set containing all non-adjacent boundary edge pairs, F be the set of triangles in P, and A(f i ) denote the signed area of f i . Then we wish to minimise E distortion subject to the constraints: min

Key idea
As explained, no existing method can generate a parameterized mesh P satisfying the aforementioned three constraints while providing a theoretical guarantee. Thus, we need to optimize the initial P to meet the constraints. In practice, the intersection-free constraint is very complicated to achieve, increasing the optimization difficulty. Our key idea is to use a scaffold mesh S to convert the intersection-free constraint into a flip-free constraint (see Fig. 3).

Scaffold meshes
To achieve the constraint conversion, S should satisfy the following conditions: • Conforming condition: the inner boundary of S should be the same as the boundary of P. • Bounding condition: S should tightly bound P. • Boundary condition: the outer boundary of S should be intersection-free. When S and P contain no flipped triangles and S satisfies the conditions above, the parameterization is globally injective [18]. In practice, the boundary condition for S is realized as positional constraints: the initial S is constructed to have an intersectionfree boundary, and its outer boundary vertices are fixed during the optimization process.

Reformulation
We reformulate Eq. (1) as Eq. (2): min where F s is the set of triangles of S and V s b contains all outer boundary vertices of S.

Challenges
Using the scaffold mesh S, only the flip-free constraint and the positional constraint remain. Therefore, we can use existing flip-free parameterization methods to obtain the desired result. However, two challenges remain for the algorithm to be robust in practice. Firstly, when the boundary of P is self-intersecting, constructing S to satisfy the conforming condition is non-trivial. Thus, it is difficult to generate an initial S to make the optimization process efficient and robust. Secondly, since the flip-free constraint is enforced on both S and P in Eq. (2), the quality of S affects the success rate of the optimization process.

Pipeline
To overcome these two challenges, we propose the following algorithm workflow (see Fig. 4): 1. Generate a globally injective parameterization (the parameterized mesh is denoted P 0 ) without the positional constraints, using Ref. [11]. 2. Transform P 0 similarly to minimize the distance between the current positions of constrained vertices and the target positions. Fig. 4 Workflow of our method. Given an input triangle mesh (a), an initial globally injective parameterization P0 is computed using Ref. [11] (b). We transform P0 similarly to reduce distances between the current positions of constrained vertices and the target positions (c) and construct the scaffold mesh S using the CDT algorithm (d). Afterwards, we move the constrained vertices to their target positions, which may flip triangles (e), and then remove flips using Ref. [8] until termination (f). If there are flipped triangles in (f), we first perform an edge-based remeshing algorithm on S to improve its mesh quality (g) and then remove flips. This remeshing-removing process is iteratively conducted until no flips exist (h). Finally, we reduce the distortion while fixing the constrained vertices using Ref. [11] (i). (P0 in (c) and (d) has the same size; it is scaled in (d) for visualization.) 3. Construct S using a constrained Delaunay triangulation (CDT) algorithm, whose constrained edge set includes all boundary edges of P 0 and the edges of a large bounding box (BB) 0 around P 0 . 4. Move the constrained vertices directly to their target positions. 5. Remove flipped triangles using Ref. [8]. If there are no flipped triangles, we first reduce the distortion using Ref. [11] while fixing the constrained vertices and then terminate the algorithm. 6. After performing edge-based remeshing using Ref. [19] on S to improve its quality, we return to Step 5, unless the maximum number of remeshing-removing iterations n max has been reached, when we terminate the algorithm. In Step 3, since the boundary of P 0 is intersectionfree, the CDT algorithm can be applied. In Step 6, we set n max = 10 in all experiments. Figure 5 shows several intermediate results when removing flips in Step 5. In Figs. 6-8, we show the effects of the distance reduction step (Step 2), the remeshing step (Step 6), and the distortion optimization step (Step 5), respectively.

Reducing distances
In order to reduce the influence of the initial scaffold mesh S, accelerate the convergence speed of the optimization, and improve the success rate of the optimization process, we propose use of a distance reduction procedure (Step 2). Let According to Ref. [44], the centroids of V H and V * should coincide when reaching the minimum of Eq. (3). After V H is centered, since V * is conformal to V O , Eq. (3) can be presented as [45]: where s i and R θ i represent the scaling factor and the rotation matrix mapping the first point to the ith point in the original centered set V O respectively. We can get the optimal solution of Eq. (4) by solving the linear equation Once the optimal position of v * 1 has been found, we can get the positions of all vertices on P 0 . For the input model in Fig. 6, if the step of reducing distance is not performed, more remeshing-removing iterations  are needed to obtain the desired result satisfying all constraints, which greatly increases the running time.

Generating initial scaffolds
We enlarge the bounding box of P 0 by 3 times to generate (BB) 0 and sample n points uniformly on each edge of (BB) 0 . Then we use the Triangle library [46] to compute the CDT to construct the initial S, whose constrained edge set includes all boundary edges of P 0 and (BB) 0 . In CDT processing, we set the maximum triangle area to be ρl 2 , where l is the average length of all boundary edges of P 0 . In our experiments, we set n = 15 and ρ = 200 (see further discussion in Fig. 10).

Remeshing
Since the quality of S affects the success rate of the optimization process, edge-based remeshing of S is  used to improve its quality. Local operations: edge collapse, edge split, edge flip, and vertex relocation, are applied iteratively. The initial target edge length L is set to the average length of the edges of S. As the process goes on, if the number of mesh edges is too large, we increase the target edge length accordingly. The specific remeshing operations performed on S are as follows: 1. We first smooth all interior vertices 10 times.
The new position of each vertex v i is simply the barycenter c i of its one-ring neighbors N i : 2. We iteratively perform the following operations 10 times, following Ref. [19]: (a) Edge split: every interior edge e is split if it is longer than 7L/3. If an interior edge is incident to two vertices of the inner boundary, it is also split.

Background
We have evaluated our algorithm on various models. Our method was implemented in C++, and all experiments are performed on a desktop PC with a 4.20 GHz Intel Core i7-7700K CPU and 16 GB of RAM. The linear systems were solved using the Intel Math Kernel Library.

Initial parameterizations
We tested three types of initial globally injective parameterizations for one model: (i) Tutte's embedding [27], (ii) the intermediate result of Ref. [11], (ii) the final result of Ref. [11]. Our method succeeded in each case (see Fig. 9). In practice, the initial parameterization affects whether the remeshing stage is needed, so the total running time differs. For example, our method has to perform remeshing operations to eliminate flips in Fig. 9(a), but this is not required in Figs. 9(b) and 9(c). The symmetric Dirichlet distortion energies of these three cases are 4.308, 4.308, and 4.308, respectively, indicating that the mapping quality of the result is insensitive to the initial parameterization, due to the final distortion reduction step.

Scaffolds
We ran our method with three different pairs of parameters (n, ρ) for scaffold mesh generation: see

Testing on a dataset
To verify the effectiveness and robustness of our method, we tested our algorithm on a dataset containing 1791 models, provided by Ref. [16]. For all models in the dataset, we used the final results of Ref. [11] as the initializations. The parameters (n, ρ) for generating scaffold meshes were fixed to (15,200). We observe that our algorithm achieves global injectivity for most of the models: our success rate is 99.8%, just failing on three examples (see Fig. 14). These results demonstrate the practical robustness of our method. Six models are shown in Fig. 11.

Speed
In Fig. 12, we plot running time versus the number of vertices N v for each algorithm step of our method. The running time tends to increase with N v , except for the remeshing step: most models do not need Fig. 9 Three different initial globally injective parameterizations, including Tutte's embedding [27] (a), the result after running the optimization of Ref. [11] for 5 iterations (b), and the result after running the optimization of Ref. [11] until convergence (c). The total running time of the algorithm is given below each result.   this step. In particular, the running time almost line-arly increases with respect to N v in the distance reduction step, the scaffold mesh construction step, and the flip removal step. The total running time is mainly affected by the processes of generating the initial parameterization and optimizing the distortion energy.

Comparisons
We compared our method to that of Ref. [16] using the authors' results. While our success rate reaches 99.8%, theirs is only 85.8%. We calculated the symmetric Dirichlet energy of 1535 results that both the method of Ref. [16] and ours obtained successfully. Denoting the ratio of their energy to ours as ρ SD , then the average ρ SD is 1.0011, with standard deviation 0.0102. Figure 13 shows comparisons on four examples.
Our method is able to generate globally injective parameterizations while they fail, indicating that our method is more robust than theirs in practice.

Summary
In this paper, we have presented a novel algorithm for disk topology meshes to generate globally injective parameterizations with hard positional constraints.
The key idea of our algorithm is to use a scaffold mesh to convert the global injectivity constraint into a flip-free constraint. We use this key idea to propose a new pipeline to compute globally injective parameterizations. We have tested our algorithm on a large dataset. The results show that our algorithm is more robust than previous methods.

Fig. 13
Comparisons of our results with those of Ref. [16], while applying the same constraints to four meshes. Top row: input meshes. Middle row: the results of Ref. [16]; they contain self-intersections or flips. Bottom row: our results are globally injective.

Limitations
Although our algorithm succeeds more often than Ref. [16] on a large dataset containing 1791 models, there are still three models whose results violate hard constraints due to numerical problems, as shown in Fig. 14. Our success is not theoretically guaranteed for arbitrary models.

Future work
In future, developing a theoretically guaranteed method is an interesting direction. It is also worthwhile to study constrained globally injective mappings in 3D, since constructing scaffold meshes and removing flips in 3D are hard tasks.

Open Access This article is licensed under a Creative
Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.
The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
Other papers from this open access journal are available free of charge from http://www.springer.com/journal/41095. To submit a manuscript, please go to https://www. editorialmanager.com/cvmj.