• 沒有找到結果。

Theoretical Analysis and Algorithm

在文檔中 Item 987654321/15186 (頁 55-63)

Chapter 5 Constrained Texture Mapping using Warping Scheme

5.2 Foldover-free 2D Triangle Mesh Warping

5.2.2 Theoretical Analysis and Algorithm

In this section, the following theoretical analysis is given, and the results of analysis are used to derive our foldover-free warping algorithm.

Theoretical Analysis

Lemma 1. If |Eα(v)| = 1 and vα is on Eα(v), v can move to vα along v without flipping m triangles after an edge swap operation.

Proof. vα is not on any vertex of Eα because |Eα(v)| = 1. Let Eα(v) = {e}. Then we show that e can be swapped before v moves to vα along v . If Q(e) is convex, then e can be swapped. m If Q(e) is not convex, the following statements show that e can still be swapped. In Figure 38(a), let e =p1p3 and vp1p2p3 be the quadrilateral Q(e). Both interior angles p3vp1 and π. Then the vertex p2 is in the shaded blue region defined by the intersection of two half-planes. These two half-planes are formed by p1p3 and vp3 , respectively, as shown in Figure 38(a). The intersection point pi of two lines p2p3 and vv is on the half-closed α interval [v,vα). If v moves to the open interval(pi,vα), ∠p2p3v is less than π. Then the edge e can be swapped.

Since |Eα(v)| = 1, only the triangle Δvp1p3 containing e is degenerated when v moves to vα, as shown in Figure 38(a). After e is swapped, the possibly degenerated triangle Δvp1p3 is removed andΔvp1p2, as well as Δvp2p3 are created. Thereafter, Δvp1p2 and Δvp2p3 are not flipped as v moves to vα, as shown in Figure 38(b). Our result follows.

pi triangles after an edge swap operation.

Proof. Let Eα(v) = {p1p2}. vα is on p1p2, but not on p1p2 . Without loss of generality, we assume that p2 is farther than p1 from vα. Let p3 be a vertex adjacent to both v and p2 such that vp1p2p3 is Q(vp2) as shown in Figure 39(a) and (b). The ∠p1p2p3 in Q(vp2) is not equal to π since |Eα(v)| = 1. Let p be the intersection of j v and m p2p3. If ∠p1p2p3 in Q(vp2) is greater than π , vαis farther than p from v as shown in Figure 39(a). This is a j

contradiction to the definition of vα. Then we know that the vertex p2 is convex for Q(vp2).

Next we show that the edge vp2 can be swapped before v moves to vα. If the Q(vp2) is not convex, we will show that vp2 can be still swapped. The ∠vp1p2 and ∠p2p3v in Q(vp2) are less than π since they are the internal angles of triangles in 2D triangular mesh T, and

3

3 1p

p is on the half-closed interval [v,vα) since∠p3vp1 ≥π . If v moves to the open interval(pi,vα), ∠p3vp1<π . Then edge vp2 can be swapped.

Since |Eα(v)| = 1, only the triangle Δvp1p2 containing p1p2 is degenerated when v moves to vα as shown in Figure 39(b). After vp2 is swapped, the possibly degenerated triangle

2

{q7q8 }. Before v moves to vα , we can swap vq4 to remove Δvq3q4 as shown in (b) and then swap vq3 to remove Δvq2q3 as shown in (c).

Lemma 3. If |Eα(v)| ≥ 1 and vα is not on Eα(v), v can move to vα along v without flipping m triangles after a set of edge swap operations.

Proof. There are one or more connected components in Eα(v) as shown in Figure 40. For each connected component C of Eα(v), we will show that the adjacent triangle of each edge in C can be removed before v moves to vα, and then no triangles are flipped when v moves to vα . We prove this by induction on |C| in the following.

q can be removed, and that triangles created by the swap of vq are not degenerated b when v moves to vα.

Using the induction hypothesis, the adjacent triangle of each edge in C can be removed as shown in Figure 40. Our result follows.

vm

along v without flipping triangles after a set of edge swap operations. m

Proof. We will show that the adjacent triangle of each edge in Eα(v) can be removed before v moves to vα, and that no triangles are flipped when v moves to vα . We classify the edges of Eα(v) into two sets B1, and B2 .

(a) B1 = {qiqj |qiqj ∈ Eα(v) and vα is on qiqj}. Then |B1| = 1 because vα can be on one edge

of Eα(v) at most. Let B1 = {qmqn}, we can follow the similar procedure as that used in Lemma 1, i.e., let qmqn be the edge e as shown in Figure 38. Then we can find that qmqn can be swapped to remove the triangleΔvqmqn, and that the new triangles created by the edge swap of qmqn are not degenerated when v moves to vα.

(b) B2 = {qiqj|qiqj ∈ Eα(v) and vα is not on qiqj }. By following the similar procedure of Lemma 3, the adjacent triangle of each edge in B2 can be removed and the new triangles are not degenerated when v moves to vα. Our result follows.

Lemma 5. If vα is on a vertex u of Eα(v), v can move to vα along v without flipping m

triangles.

Proof. We first show that u can be temporarily moved, such that u is not on the direction of

v . We create a moving direction m u′ for u by randomly picking a direction that is not the m same as v and mvm as shown in Figure 41(a). Then u can find a temporary invalid point

u′ by α u′ . If u moves to the open intervalm (u ′ , u is not on the direction of ,uα) v and no m triangles are flipped. Then by Lemma 3 or Lemma 4, v can continue moving to vα as shown in Figure 41(c). Our result follows.

In addition, Figure 41(c) shows that u can also move back to vα along −u′m to restore its original position by Lemma 3 or Lemma 4 after v leaves vα along v . m

We can state the following theorem from Lemma 3, Lemma 4, and Lemma 5.

Theorem 1. v can move to the invalid point vα along v without flipping triangles. m

Foldover-free Warping Algorithm

Now, we will describe a foldover-free 2D mesh warping algorithm in MeshWarp() based on the above analysis. Iteratively, this algorithm moves each vertex v along v tom v~. If v is required to move to vα , the algorithm executes edge swaps to remove possibly degenerated triangles. Then v moves to vα using MoveToInvalidPoint(v). The procedure MoveToInvalidPoint() is derived from Lemma 3, Lemma 4, and Lemma 5. Note that the StepSpeed in MeshWarp() is a user-defined constant to control the warping speed and MinimalStep(T) returns the minimal distance between each vv~ for all un-aligned vertices.

In our experiment, if the StepSpeed constant is set too large, the number of edge swaps would

become bigger and the large distortion would occur in base mesh. From our experimental experience, the value 0.1 is a good constant for the StepSpeed.

The warping algorithm may possibly generate very skinny triangles that would cause a numerical error in computation. From our practice, it is usually due to a very small “Step” in MeshWarp(T). We avoid this problem by limiting the value of “Step” to not be smaller than a pre-defined threshold. In addition, before an edge swap, when v is required to move to the open interval (pi, vα), the vertex v is always moved to 0.5*(pi + vα) in MoveToInvalidPoint(v).

Such movement is also useful in preventing the generation of skinny triangles.

在文檔中 Item 987654321/15186 (頁 55-63)

相關文件