Tracking Intersection Curves of Deforming Parametric

0 downloads 0 Views 777KB Size Report
neither required to be orthogonal to the tangent plane, nor to be of unit-length. ... one hand, and to the unit normal offset surfaces [24, 18] on the other .... (dt т, dt b) in the parametric space of surface ˆX, where a, b, т, and b .... Each equation d[i](s, s, t)=0 defines a hyper- surface in R5 ..... slope lines discussed in [21]. Finally ...
Tracking Intersection Curves of Deforming Parametric Surfaces Xianming Chena∗, Elaine Cohena , James Damonb , Richard F. Riesenfelda School of Computing, University of Utah Department of Mathematics, University of North Carolina a

b

Abstract This paper presents the mathematical framework, and develops algorithms accordingly, to continuously and robustly track the intersection curves of more than one deforming parametric surfaces, with the deformation represented as generalized offset vector fields. The totality of intersection curves of 2 deforming closed surfaces, over time, is formulated as an implicit 2-manifold I in the augmented (by time domain) parametric space R5 . Hyperplanes corresponding to some fixed time instants may touch I at some isolated transition points, which delineate transition events, i.e., the topological changes to the intersection curves. These transition points are the 0-dimensional solution to a rational system of 5 constraints in 5 variables, and can be computed efficiently and robustly by some rational constraint solver using subdivision and hyper tangent bounding cones. The actual transition events are computed using error-bounded contouring of the local osculating paraboloids. Away from any transition points, the intersection curves do not change topology and evolve according to a simple evolution vector filed that is constructed in the working space where the surfaces are embedded. Similar procedures apply to both the tracking of intersection end points relating to surfaces boundaries, and the tracking of triple-points relating to 3 local surfaces, with the major difference that now the the corresponding implicit manifolds are both 1-dimensional and the evolution algorithms are performed by marching along the 1-manifolds directly in the appropriate augmented parametric spaces. Keywords: Evolution of dynamic surface-surface intersection, transition of dynamic surface-surface intersection, deforming surface, generalized offset surface, triplepoint, surface-surface intersection, augmented parameteric space, singularity detection, shape computation of implicit 2-manifold in R5 -space. ∗ contact

author: [email protected]

1 Introduction In this paper we consider the dynamic intersection of more than one deforming parametric surfaces. The surface deformation is represented by generalized offset surfaces, an extension [5, 6] to the traditional unit normal vector offset surfaces. Specifically, let x(s) be a regular primary surface with parameterization s ∈ R2 , the generalized offset surface is X(s, t) = x(s) + tU (s),

(1.1)

where t is the offset time, and U (s) is another (vector) surface parameterized again in s. The offset vector U is neither required to be orthogonal to the tangent plane, nor to be of unit-length. The only restriction is that U has to be transversal, i.e. not tangential, to the tangent plane. J. Damon [5, 6, 7] also extends the shape operator [22] to the generalized offset surfaces, and defines radial curvatures as the corresponding eigen values; consequently, he establishes the relation between local self-intersection and the radial curvatures. In this paper, we focus only on the dynamic intersection of more than one deforming surfaces, both assumed to be free of local self-intersection during the whole deformation duration. Moreover, they are further assumed to be free of any global self-intersection. Notice that, however, the mathematical formulation and algorithms, developed later in this paper, apply perfectly well to the situation of global self-intersection of a generalized offset surface; and thus the second assumption is really not essential and is assumed merely for the easy illustration of the basic idea. The work in this paper is, in some extent, related to the traditional static surface-surface intersection [3] on one hand, and to the unit normal offset surfaces [24, 18] on the other hand. We emphasize the topological robustness of surface intersection, which has a long research history for the static surface-surface intersection (see e.g., [28, 27, 12, 19, 1, 16]). Jun et al. [13] worked on surface slicing, i.e. the intersection of a surface with a series of parallel planes, exploring the relation between the transition

points and the topology of contour curves. The transition points, though, are only used to efficiently and robustly find the starting point of the contour curves for a marching algorithm (e.g., [2, 4]) to trace out the whole curve. Ouyang et al. [23] applied the similar approach to the intersection of two unit normal vector offset surfaces. However, our work is significantly different from all these works in both the specific application considered and the basic approach adopted:

TS ˆ

X

TSX ˆ N×N

X1

¯ N

1. we consider generalized offset surfaces; and this means, among others, that the transition point detection is not as simple as in [13, 23];

X0

Figure 1. A Local Basis for Evolution Vector

2. we track all dynamic intersection curves continuously, and interactively; 3. we do not rely on any marching algorithm to trace out the whole intersection loop from some given starting point. Instead, the whole loop continuously evolves 1 according to a very simple vector field;

develops similar formulation for tracking the intersection curve end points that correspond to surface boundaries, and for tracking the triple-points that correspond to three local surfaces. After making some comments on the degenerate situations in Section 6, the paper concludes in Section 7.

4. we formulate the totality of intersection curves, over time, as an implicit 2-manifold I in the augmented (by time domain) parametric space R5{s,ˆs,t} ;

2 Evolution of Intersection Curves In this section, we define a vector field ζ in the working space R3 where the deforming surfaces are embedded. The vector field is called the evolution vector field because, given a point P ∈ R3 on some original intersection curve at time t, P + ζ(P )dt is the corresponding one on the intersection curve at time t + dt. The evolution vector has two equivalent representation; with respect to each of the two surface parameterizations, it is expressed in the basis of the corresponding offsetting vector, and the two corresponding partial derivatives of the deforming surface. Therefore, after the vector field is constructed (by solving one 3 × 3 and another 2 × 2 linear systems), the evolution has a trivial implementation – just marching in the parametric spaces, with step sizes directly read off from the appropriate coefficients of the evolution vector field.

5. the newly created loop is initialized at the time of the corresponding creation event, using the 2nd order shape computation on I in R5{s,ˆs,t} . Later it simply evolves, or may occasionally split into two loops or merge with some other loop; both the split and merge events are achieved by the same shape computation; 6. we apply similar approach to tracking the intersection curve end points that correspond to surface boundaries, and to tracking triple-points that correspond to 3 local surfaces. The rest of the paper is organized as follows. Section 2 constructs an evolution vector field for following the intersection curves simply by stepping in the parametric space. After formulating, in Section 3, the locus of intersection curves of two deforming closed surfaces as a 2-manifold I in R5{s,ˆs,t} , Section 4 is dedicated to tackling the problem of computing transition events, i.e., the topological change of intersection curves. First, in Section 4.1, the transition points are formulated and detected as the zero set of a rational system of 5 constraints in 5 variables. After a short revisit, in Section 4.2, to the topic of evolution vector field, Section 4.3 computes the transition events using error-bounded contouring on the osculating quadric to the local surface. To make our approach applicable to realistic models such as deforming trimmed models, Section 5

2.1 Evolution Vector Field Consider two deforming surfaces represented as generalized offset surfaces, X(s, t) = x(s) + t U (s), ˆ s, t) = xˆ(ˆ ˆ s), X(ˆ s) + t U(ˆ where s = (s0 , s1 ) ∈ R2 and sˆ = (ˆ s0 , sˆ1 ) ∈ R2 are the parameters to the two primary surfaces x(s) and x ˆ(ˆ s), and ˆ (ˆ their corresponding offset vector surfaces U (s) and U s). Consider locally an intersection point P of the two deforming surfaces at some time point. Assume that the tangent

1 Each point on the loop evolves independently, and with exactly the same algorithm. Thus, there would be a significant speedup if the program is multi-threaded in a multiprocessor machine.

2

planes to the two offset surfaces at P are not the same (otherwise, it is a singular case corresponding to the transition points which we will discuss later in section 4.1). Let

The vector field (Eq. (2.1) and 2.2), called consequently the evolution vector field by Observation 1, is on the level set surfaces (not only the one with zero value, i.e. L0 ) simply because the directional derivative of the scalar value tˆ − t vanishes along the evolution vectors, as verified below (the derivative notation in [15] pp.70-80 is used),

N = X0 × X1 ˆ =X ˆ0 × X ˆ1 N

ˆ tˆ] − ζ[t], ζ[tˆ − t] = ζ[

to be the 2 unnormalized normals to the two surfaces, re¯ be a vector in the tangent plane spectively. Further, let N to X at P and perpendicular to the tangent to the intersection curve at P , i.e.,

where ˆ tˆ] = U[ ˆ tˆ] + a ˆ 0 [tˆ] + ˆbX ˆ 1 [tˆ] = 1 + 0 + 0 = 1, ζ[ ˆX

¯ = (N × N ˆ) × N ˆ. N

and similarly

Because the two tangent planes to the two surfaces at P are ¯ is a local basis of the vector not the same, {X0 , X1 , N} ˆ i denotes space R3 (see Fig. 1). Notice that, in this paper, X the partial derivative ∂X (i = 0, 1), and similarly does Xi . ∂ sˆi ˆ Decomposing δU = U − U in this local basis gives,

ζ[t] = 1. Hence,

ζ[tˆ − t] = 0,

i.e., the directional derivative of the function tˆ − t with respect to vector ζ(P ) vanishes at P . Notice that, geometrically, the evolving of the intersection curve along the evolution vector fields is simply a front propagation (not necessary normal direction, though) of the intersection curve on L0 . Thus, it is obvious that the evolution vector field as defined in Eq. (2.1) or (2.2) is ˆ −U not unique. Actually, had we decomposed δU = U ˆ ˆ ˆ0 , X ˆ1 , N ¯ } , where N ¯ = with respect to the other basis {X ˆ (N × N) × N , we would have arrived

ˆ − U = aX0 + bX1 + c N ¯. δU = U Observing that the last term cN is on the tangent plane ˆ at P , and consequently can be represented in the the to X ˆ 0, X ˆ 1 }, to the tangent plane, as follows, natural basis, {X ¯ = −(ˆ ˆ 0 + ˆbX ˆ 1 ), cN aX we have, ˆ − U = aX0 + bX1 − (ˆ ˆ 0 + ˆbX ˆ 1 ), δU = U aX

ˆ + cˆX ˆ 0 + dˆX ˆ1 . ηˆ = U η = U + cX0 + dX1 ,

or, ˆ + (ˆ ˆ 0 + ˆbX ˆ 1 ) = U + aX0 + bX1 . U aX

(2.4) (2.5)

by the same procedure as detailed earlier. With two disˆ and η (= ηˆ), available, tinct evolution vector fields, ζ (= ζ) we can define any other evolution vector filed as we want. Especially, we can construct an evolution vector χ that is essentially a front propagation along normal direction of the intersection curve on the level set. To define the evolution vector χ, first let us notice that ζ(P ) and η(P ) span the tangent space to L0 at P . To find the a tangent direction that is perpendicular to the intersect curve passing P , simply take the cross product of the intersection curve direction and the normal to L0 , i.e.,

Consequently, we have a vector fields with two equivalent representations, ζ = U + aX0 + bX1 , ˆ +a ˆ 0 + ˆbX ˆ1 . ζˆ = U ˆX

(2.3)

(2.1) (2.2)

Now define a scalar field R , with a scalar value on any point Q to be tˆ − t , where tˆ (t) is the time when the ˆ s, t) (X(s, t)) reaches Q. Recalling that P surface X(ˆ is a point on the intersection curve of the two deforming surfaces, there is a zero (i.e., tˆ − t = 0 ) level set surface passing P . This zero level set at P , denoted as L0 hereafter, is actually the locus of the local intersection curves of the two deforming local surfaces. It turns out that ζ(P ) or ˆ ) is precisely on the tangent plane to L0 . Therefore, ζ(P 3

ˆ ) × (ζ × η). V = (N × N Then solve V = e ζ + f η = e ζˆ + f ηˆ, for e and f . Finally construct the perpendicular evolution vector field as,

Observation 1 after an infinitesimal deforming time dt, the evolving of the original intersection point P in the Euclidean space is reduced to taking a step of (dt a, dt b) in the parametric space of surface X and taking a step of ˆ where (dt a ˆ, dt ˆb) in the parametric space of surface X, a, b, a ˆ, and ˆb are the coefficients in Eq. (2.1) and Eq. (2.2).

e f ζ+ η, e+f e+f e ˆ f χ ˆ= ζ+ ηˆ, e+f e+f χ=

3

i.e.,

Algorithm 1. Evolution of Offset Surface Intersection Points

ea fc eb fd + )X0 + ( + )X1 , e+f e+f e+f e+f f cˆ e ˆb f dˆ ˆ ˆ +( ea + )X0 + ( + )X1 . χ ˆ=U e+f e+f e+f e+f χ=U +(

Input: X0 (s, t), X1 (s, t), U (s) ˆ 0 (s, t), X ˆ 1 (s, t), U ˆ (ˆ X s) s, ˆ s, t : current intersection point δt : move step for the offset surfaces Output: s, ˆ s, t : next intersection point. Begin U ⇐ U .Eval(s0 ) ˆ .Eval(ˆ ˆ ⇐U U s0 ) X0 ⇐ X0 .Eval(s, t) X1 ⇐ X1 .Eval(s, t) N ⇐ X0 × X1 ˆ 0 .Eval(ˆ ˆ0 ⇐ X X s, t) ˆ 1 .Eval(ˆ ˆ X1 ⇐ X s, t) ˆ ⇐X ˆ0 × X ˆ1 N ¯ ⇐ (N × N) ˆ ×N ˆ N ˆ − U = aX0 + bX1 − c N ¯ for a, b, c Solve U i ⇐ Maximize i∈{0,1,2} (kˆ n[i]k) j ⇐ (i − 1) modulo 3 k ⇐ (i + 1) modulo 3 n c¯ ˆX ˆ 0 [j] + b ˆ 1 [j] n[j] = ˆ aX ˆ a, b Solve ˆ ˆ ˆ 1 [k] for ˆ c¯ n[k] = a ˆX0 [k] + bX s0 ⇐ s0 + δt a s1 ⇐ s1 + δt b ˆ s0 ⇐ ˆ s0 + δt ˆ a ˆ ˆ s1 ⇐ ˆ s1 + δt b PointRefine(s, ˆ s) t ⇐ t + δt End

Algorithm 1 evolves the intersection curve by following the evolution vector field ζ = ζˆ (cf. Eq. (2.1), Eq (2.2), and Observation 1). Evolution algorithms using the vector field η = ηˆ or χ = χ ˆ can be similarly designed. For the simple demonstration programs accompanying this paper, we have found that Algorithm 1 already does a fairly satisfactory job. However, we expect that for more complicated models, using normal direction front propagation via χ = χ ˆ may have some advantage over either ζ = ζˆ or η = ηˆ. To make the evolution of intersection curves complete, we need to consider two more issues namely, the relaxation of the evolved curve to the exact intersection curve and the insertion of sample points on an intersection loop. Point Refine Algorithm Various point refinement algorithms are discussed in [4] in the context of static surfacesurface intersection. We simply adopt the middle point algorithm as presented in [3]. With a same point tolerance of 1E−5, the average iteration number is only around 1.0, due to our successful evolution algorithm. We put Algorithm 2 here just for easy reference. Sample-Insertion Algorithm We are not tracing out a whole intersection loop from some starting point; instead, we represent it using a a fair amount of ordered sample points (typically from 20 to 60 for our implementation) and evolve the whole intersection loop the next one by evolving each sample point. New samples need to be inserted for two situations namely, 1. the spacing of any two consecutive samples are too large

Sample-Deletion Algorithm When samples of an intersection loop get too crowded, we need to delete redundant samples. At any deletion iteration, the sample to be deleted is the one that has the minimal distance its neighboring points and that is almost on the line connecting its left and right neighboring points.

2. the polygonal approximation of the tangent continous intersection loop has too sharp vertex corners. The new sample point is typically initialized to be the middle point of the corresponding two consecutive sample points, but will adaptively re-initialized to closer and closer to the either of the two original sample point if either of the two following situations occur,

Adaptive Evolving Step Size The complete set of algorithms (including those presented in later sections) used for the tracking of intersection curves requires many control variables. So far, we have seen,

1. the refine algorithm on the new sample point failed 2. the refined new sample point is closer to a point in the loop other than either of the two points from which it is interpolated.

1. evolving step size for evolution algorithm. 2. max iterations for refine algorithm. 4

All these control variables, acting together, determin both the robustness and efficiency of the tracking algorithm. They are inter-related in a quite complicated way. However, of all the control variables, evolving step size is a unique one because the tracking is guaranteed to be successful (assuming, of course, the various transition algorithms, presented later, work properly) if the step size approaches 0 in a limiting sense. Therefore, to make the tracking robust for all situations and efficient for most situations, the evolving step size is adaptively changed automatically based on the the current average refinement iterations and whether other algorithms succeed or not, while all others are pre-set and are changed only through user interaction.

Algorithm 2. Point Refine Input: X (s, t), X0 (s, t), X1 (s, t) ˆ (s, t), X ˆ 0 (s, t), X ˆ 1 (s, t) X s, ˆ s, t : intersection point to be refined. Output: s, ˆ s, t : refined intersection point. Begin ˆ .Evaluate(ˆ ˆ ⇐X PP s, t) − X .Evaluate(s, t) X0 ⇐ X0 .Eval(s, t) X1 ⇐ X1 .Eval(s, t) N ⇐ X0 × X1 ˆ 0 .Eval(ˆ ˆ0 ⇐ X X s, t) ˆ 1 .Eval(ˆ ˆ X1 ⇐ X s, t) ˆ ⇐X ˆ0 × X ˆ1 N ˆ T ⇐N×N V ⇐T×N ˆ ⇐T×N ˆ V ˆ ˆ + cT for a, b, c Solve PP = aV + bV c PQ ⇐ aV + 2 T ˆ = PQ − PP ˆ PQ

3 Formulation in the Augmented Parametric Space Define a distance mapping 3 ˆ − X : R5 d(s, sˆ, t) = X {s,ˆ s,t} −→ R

where R5{s,ˆs,t} is the combined parametric space of the two surfaces, plus the time domain, and is thus called augmented parametric space. The zero set of this mapping, denoted as I hereafter in this paper, gives the locus of intersection points in R5{s,ˆs,t} . Notice that d(s, sˆ, t) actually has three separate coordinate functions, d[i](s, sˆ, t) with i = 0, 1, 2. Each equation d[i](s, sˆ, t) = 0 defines a hypersurface in R5{s,ˆs,t} , with the corresponding normal ∇d[i]. Therefore, geometrically, I is the locus of intersection points of the three hyper-surfaces in R5{s,ˆs,t} , with normals

i ⇐ Maximize i∈{0,1,2} (kN[i]k) j ⇐ (i − 1) modulo 3 k ⇐ (i + 1) modulo 3 n PQ[j] = aX [j] + bX [j] 0 1 Solve for a, b PQ[k] = aX0 [k] + bX1 [k]

ˆ i ⇐ Maximize i∈{0,1,2} ( N[i]

) j ⇐ (i − 1) modulo 3 k ⇐ (i + 1) modulo 3 n PQ[j] ˆ ˆ 0 [j] + b ˆX ˆ 1 [j] =a ˆX ˆ Solve ˆ, b ˆ ˆ ˆ ˆ 1 [k] for a PQ[k] = ˆ aX0 [k] + bX s0 s1 ˆ s0 ˆ s1 End

(3.1)

ˆ 0 [0], N0 = (−X0 [0], − X1 [0], X ˆ 0 [1], N1 = (−X0 [1], − X1 [1], X

ˆ 1 [0], δU [0]) X ˆ 1 [1], δU [1]) (3.2) X ˆ 0 [2], X ˆ 1 [2], δU [2]) N2 = (−X0 [2], − X1 [2], X

⇐ s0 + a ⇐ s1 + b ⇐ˆ s0 + ˆ a ˆ ⇐ˆ s1 + b

ˆ denote the corresponding where the subscripts to X and X ∂X partial derivatives, i.e., X0 = ∂s etc. Writing the three 0 normal vectors in a 3 × 5 matrix form, gives us actually the Jacobian [17] of the mapping d(s, sˆ, t) : R5{s,ˆs,t} −→ R3 ,  ˆ 0 [0] X ˆ 1 [0] δU [0]  −X0 [0] −X1 [0] X ˆ 0 [1] X ˆ 1 [1] δU [1]  , J =  −X0 [1] −X1 [1] X ˆ 0 [2] X ˆ 1 [2] δU [2] −X0 [2] −X1 [2] X

3. maximal and minimal spacings between two neighboring samples used for sample insertion and deletion algorithm.

or succinctly,

ˆ0 X ˆ 1 δU ), J = (−X0 −X1 X

4. maximal sharpness of a vertex sample for sample insertion algorithm.

(3.3)

where each vector in R is considered as a column vector. For a regular parameterization of the deforming surface X(s, t), X0 and X1 are independent of each other; ˆ 0 and X ˆ 1 . Therefore, similar claim can be made for X 3

5. maximal iterations used for the adpatively interpolating two neighbroing sample points to a new sample. 5

Remark 1 The rank of the Jacobian is considered in two different situations. 1. If the two tangent planes to the two deforming surfaces at the intersection point are not the same, then ˆ i ]’s (i = 0, 1) can not all vanish, and thus J [X0 X1 X has the full rank of 3. 2. On the other hand, if the two tangent planes to the two deforming surfaces at the intersection point are the same, we will show shortly that there will be some interesting transition event happening. Generically, there are only isolated intersection points with coincident tangent planes to both surfaces. This paper is restricted to this generic situation. Furthermore, it is also assumed that, at such a touching point, δU is not ˆ0 X ˆ 1 δU ] = on the common tangent plane, and thus, [X ˆ 0ˆ 1δ 01δ T 6= 0 and [X0 X1 δU ] = T 6= 0 (T ’s to be introduced shortly), and the Jacobian J again has the full rank.

Figure 2. Transition: A Split Event

4.1 Detection of Transition Events For the intersection of parallel planes with a static surface [13], the detection of transition points are reduced to the simple cases of either intersecting a surface by the Zaxis or intersecting a space curve by the XY-plane. For the intersection of two unit normal offset surfaces [23], the transition points are independent of the offset distances, and correspond to pairs of points on the two primary surfaces that have the same normal direction. The robust detection of such co-normal pairs is investigated extensively in the CAD community, especially in [32]. For general offset surfaces, however, the transition points do not have a simple relation to the normal vector surfaces derived from the two primary surfaces. In this sub-section, we formulate the topological transition points as the zero set of a rational system of 5 constraints in 5 variables. Notice that the zero set is of dimension 0, and thus can be robustly and efficiently computed using a rational constraint solver. In our implementation, the rational constraints are represented as multivariate B-spline functions, and we develop a subdivision-based NURBS constraint solver similar to [9] to do the job. The robustness is achieved by bounding the subdivided implicit surface I with the corresponding hyper tangent cone [9], which is an extension of the bounding tangent cones for explicit plane curves and explicit surfaces [28, 27]. Let us recall that the implicit 2-manifold I in R5{s,ˆs,t} is the locus of intersection points of the two deforming surfaces, over the whole deforming time period (for implementation, we consider time interval [0, 1]; notice that this is not restrictive at all, since the offset vectors can be scaled down or up as necessary). Geometrically, the intersection curves, at some time point, is the corresponding height contour of I when the time dimension is regarded as the vertical height. Therefore, it is obvious that there will be one of the four transition events listed earlier, if the tangent space to I at a point (s, sˆ, t) is orthogonal to the t-axis. Sine the tangent space to I has the same dimension as I itself, i.e.

In conclusion, I, as the zero set of the distance mapping 3 ˆ − X : R5 d(s, sˆ, t) = X {s,ˆ s,t} −→ R , is a well defined implicit 2-manifold in the augmented parametric space(for details, see [14] where it is called a manifold defined by submersion).

4 Transition of Intersection Loops Assuming the two tangent planes to the two deforming surfaces at the considered intersection point P are not coincident, Section 2 constructed evolution vector fields and developed algorithms for evolving the intersection curve. The event is called an evolution because the topology of the intersection curves remain the same. This section, on the other hand, is dedicated exactly to the singular situation where the two tangent planes are coincident. At such a point, called a transition point or transition point hereafter, there will be a transition event, which is one of the following more specific events, 1. a creation event: a new intersection loop is created. 2. an annihilation event: an existing intersection loop collapse and disappears. 3. a split event: an existing intersection loop have a pair of its hyperbolic-like segments approach to each other and switch to another pair of hyperbolic-like segments and thus split into two intersection loops (see Fig. 2). 4. a merge event: two existing intersection loops have a pair of hyperbolic-like segments approach to each other and switch to another pair of hyperbolic-like segments and thus merge into one intersection loop (see Fig. 2 in reverse order).

6

2, the orthogonality condition is equivalent to the following two equations,

At transition points, the last component of T0 and T1 should vanish, i.e. ˆˆ ˆ0 X ˆ 1 ] = 0, T0 [4] = T 001 = [X0 X

T0 [4] = 0, T1 [4] = 0,

T1 [4] = T

where T0 and T1 are any two vectors spanning the tangent space. A simple and natural way to construct such a pair of tangent vectors is to let T0 be the tangent to an s1 -iso-curve on I with the extra constraint s1 = c1 for some constant c1 , and let T1 be the tangent to an s0 -iso-curve on I with the extra constant s0 = c0 for some constant c0 . Noticing that an s1 -iso-curve is the intersection of 4 hyper surfaces in R5{s,ˆs,t} , defined by s1 = c1 and d[i] = 0 (i = 0, 1, 2), e0 e1 0 1 T0 = −X0 [0] −X1 [0] −X0 [1] −X1 [1] −X [2] −X [2] 0 1

e2 e3 e4 0 0 0 ˆ 0 [0] X ˆ 1 [0] δU [0] X ˆ 0 [1] X ˆ 1 [1] δU [1] X ˆ 0 [2] X ˆ 1 [2] δU [2] X

ˆˆ

ˆ

ˆ

1 0ˆ 0ˆ

),

( T [i] = T ˆ0ˆ1δ i ˆ Ti [2] = T i1δ ˆ Ti [3] = −T i0δ

ˆ

ˆˆ

Remark 4 Eq. (4.3) defines a pair of tangent vector fileds, T0 and T1 , on I, essentially by taking s1 -iso-curves and s0 iso-curves on I. By analogous reasoning, there is another pair of tangent vector fileds, Tˆ0 and Tˆ1 , on I, by taking sˆ1 -iso-curves and sˆ0 -iso-curves, respectively. Without repeating the derivation, the tangent vector fields are,

(4.1)

1ˆiδ ( Tˆi [0] = −T ˆ Tˆi [1] = T 0iδ Tˆi [i + 2] = T 01δ ˆ Tˆi [4] = −T 01i

(4.2)

(4.7)

4.2 Evolution Algorithm by Front Propagating on Implicit 2-Manifolds in R5{s,ˆs,t}

ˆˆ

i = 0, 1

i = 0, 1

again, with the missing component being 0.

The two tangent vector fields can be more concisely written as, 01δ ( Ti [i] = T ˆ Ti [2] = T i1δ ˆ Ti [3] = −T i0δ ˆˆ Ti [4] = T i01

(4.6)

ˆ − X = 0, Eqs. (4.4) and (4.5) give Finally, together with X a rational system with 5 constraints in 5 variables, the 0dimensional solution set of which is all the transition points we are looking for.

Similarly 2 , ˆ

i = 0, 1

Remark 3 It is easily seen that Eq. (4.4) and 4.5 simply require the two tangents, X0 and X1 , to the first offset surface to be perpendicular to the normal of the second offset surface, that is, the two tangent planes to the two deforming surfaces in the working space are coincident.

,

ˆˆ ˆ0 X ˆ 1 δU ]. T 01δ = [X

ˆˆ

(4.5)

with the omitting components being 0’s.

where T ’s denote the triple scalar products of the three corresponding vectors indicated by the superscripts. A suˆ i , respectively, while perscript of i and ˆi represent Xi and X a superscript of δ represents δU . For example,

T1 = (0, T 01δ , T 11δ , − T 10δ , T 101 ).

ˆ0 X ˆ 1 ] = 0, = [X1 X

(4.4)

Therefore, more concisely, the two tangent vectors are now,

where ei (i = 0, 1, 2, 3, 4) is the unit vectors along each axis of the augmented parametric space R5{s,ˆs,t} . Working on the determinant yields, T0 = (T 01δ , 0, T 01δ , − T 00δ , T

1ˆ 0ˆ 1

In Section 2, we derived an optimal evolution vector field to follow the intersection curve. The optimality is based on the heuristic that the movement is minimal in the working space. By formulating intersection curves and its totality, i.e., I , in the augmented domain space R5{s,ˆs,t} , we are able to define another optimal evolution vector field with minimal movement in the metric of R5{s,ˆs,t} . Any intersection curve, as a height contour of I in the augmented parametric space, is the intersection of the 4 hyper-surfaces d[0] = 0, d[1] = 0, d[2] = 0 and t = c for some constant time c. The four hyper-surfaces have normals N0 , N1 , N2 and n = (0, 0, 0, 0, 1), respectively,

(4.3)

with the omitting component being 0. ˆˆ

Remark 2 By Remark 1, T 01δ 6= 0 at any transition point. Therefore, T0 and T1 are guaranteed to be independent of each other at least at a transition point. 2 In the similar derivation, the normal vector to hyperplane s = c 0 0 (for some constant c0 ) is specified as (−1, 0, 0, 0, 0) in order that a more symmetric result is achieved.

7

(a) 1 ellipse

The implicit surface I is a 2-manifold in a 5dimensional space R5{s,ˆs,t} . Shape computation is challenging because it is an implicit surface, and also because it has codimension other than 1. Most recently, a comprehensive set of formulas for curvature computation on implicit curves/surfaces was presented in [10], with many references therein. However, it is only limited to curves/surfaces embedded in 2D or 3D spaces. There is some literature, for example, [11, 30] and references therein, from the visualization community, that develops second order derivative computation on isosurfaces extracted from trivariate functions. Most of these approaches use discrete approximation. Recently, [29] developed B-spline representations for the Gaussian curvature and squared mean curvature of the iso-surfaces extracted from volumetric data defined as a trivariate function, and subsequently presented an exact curvature computation at any point of the 3D domain. While we also seek an exact differential computation, at any point as requested, the task here is significantly different from that in [29] or, for example, in [11, 30] – the implicit 2-manifold I has codimension 3. We also notice that a set of formula for computing Riemannian curvature, mean curvature vector, and principal curvatures, specifically for a 2manifold, and with any codimension, is presented in [31]. However, we have a specific goal for the second order computation, namely initializing the newly created intersection loop, or switching the two pairs of hyperbolic-like segments, based on the shape approximation. For a surface in 3-space, the local shape approximation is simply the osculating quadric, expressed in the second fundamental form [22] as z = II(a, a) where a is any tangent vector, and z is the vertical distance from the local surface point to the tangent plane. Observing that the second order shape approximation is best done if the codimension is 1, we do not perform the second fundamental form directly on the 2-manifold in 5-space. Instead, we project the 2-manifold to a 3-space of either R3{s,t} (our choice in this paper)or R3{ˆs,t} . The second fundamental form is then computed for this projected 2-manifold, and shape approximation is achieved subsequently. Notice that the shape approximation in the projected 3-space only gives partial answer to the transition event; the full solution is achieved by the tangential mapping between the projected 2-manifold and the original one.

(b) 2 pairs of hyperbolas

Figure 3. Contouring Osculating Paraboloid and consequently the tangent T to the intersection curve is computed to be, e0 e1 e2 0 0 0 ˆ T = −X0 [0] −X1 [0] X0 [0] −X0 [1] −X1 [1] X ˆ 0 [1] −X [2] −X [2] X ˆ 0 [2] 0 1 ˆˆ

ˆˆ

ˆ

e3 e4 0 1 ˆ 1 [0] δU [0] X ˆ 1 [1] δU [1] X ˆ 1 [2] δU [2] X ˆ

= (T 101 , − T 001 , − T 011 , T 010 , 0)

The intrinsic normal to the intersection curve, denoted as V , being perpendicular to its tangent direction and on the tangent space to I, is, V =

e0 e1 e2 ˆˆ ˆˆ ˆ T 101 −T 001 −T 011 ˆ 0 [0] −X0 [0] −X1 [0] X ˆ 0 [1] −X0 [1] −X1 [1] X ˆ 0 [2] −X0 [2] −X1 [2] X

The first component is ˆˆ

ˆˆ

V0 = −T 001 T 01δ − T

01ˆ 1

ˆ

e3 e4 ˆ T 010 0 ˆ 1 [0] δU [0] X ˆ 1 [1] δU [1] X ˆ 1 [2] δU [2] X

T 11δ − T

01ˆ 0

ˆ

T 10δ ,

and similarly for the other four components. Notice that the integral lines of the evolution vector field V is just the slope lines discussed in [21]. Finally, based on V , the evolution corresponding to a time interval δt is computed as, δs0 =

V1 V2 V3 V0 δt, δs1 = δt, δˆ s0 = δt, δˆ s1 = δt V4 V4 V4 V4

4.3 Compute the Structural Change at Transition Events

4.3.1 Projection of I to R3{s,t}

In this section, we preform the shape computation of the 2-manifold I at a transition point, and subsequently compute the corresponding transition event by contouring the osculating paraboloid [15, 22] to the local shape. See Fig. 3.

At the neighbor of a critical point, T0 in Eq. (4.1) and T1 in Eq. (4.2) give two vectors spanning the tangent space to I. 3 By projecting I onto R{s and ignoring the sˆ0 and sˆ1 0 ,s1 ,t} components, we transform I, a 2-manifold in R5{s,ˆs,t} , into 3 a surface in R{s,t} , denoted as Is . Furthermore, the projec8

4.3.2 The Shape Computation

Algorithm 3. Map TSIs into R4{s,ˆs}

The Second Fundamental Form The local shape of Is in R3{s,t} is determined from the second fundamental form II. Using {T0s , T1s } as the local basis to the tangent plane TSIs , II has a matrix representation,   (4.13) II = N s · ∇TisTjs

Input: J p = (s0 , s1 , ˆ s0 , ˆ s1 ) : the transition point V : a list of sampling points in TSIs Output: L : a list of sample points in R4{s,ˆs} Begin Foreach v in V ˆˆ δs0 ⇐ T 01δ v[0] ˆˆ δs1 ⇐ T 01δ v[1] ˆ ˆ δˆ s0 ⇐ T 01δ v[0] + T 11δ v[1] ˆ ˆ δˆ s1 ⇐ −T 00δ v[0] − T 10δ v[1] Push p + (δs0 , δs1 , δˆ s0 , δˆ s1 ) into L EndFor End

By Eq. (4.12)), the second fundamental form, at a transition point, is simply 3 ,   II = ∇TisTjs [2] . (4.14)

and the local shape is approximated by the osculating quadric, which has the following Monge patch form [22, 15],    a0 δt = II(a, a) = a0 a1 II , (4.15) a1

where a = (a0 , a1 ) ∈ TSIs . Notice that we wrote the LHS as δt, because, at a transition point, the tangent plane TSIs is horizontal, and thus the local vertical direction is exactly the time deviation from the considered transition point. The covariant derivatives are best computed in the original 5-space, i.e.,

tion, denoted as Π hereafter, is a diffeomorphism, and the projected tangent plane (the tangent plane to Is ) is spanned by, ˆˆ

ˆˆ

T0s = (T0 [0], T0 [1], T0 [4]) = (T 01δ , 0, T 001 ), T1s = (T1 [0], T1 [1], T1 [4]) = (0, T

ˆ 0ˆ 1δ

,T

1ˆ 0ˆ 1

),

(4.8) (4.9)

∇Tis Tjs [2] = ∇Ti Tj [4].

where we have used the superscript s to distinguish the tangent and normal vectors from their counterparts of I in the original augmented parametric space R5{s,ˆs,t} .

By Eq. (4.3) (tangent vectors) and Eq. (4.6) (tangent vectors at transition points),

ˆˆ

T

At exactly the transition point where T 001 = 0 and = 0 (cf.Eq. (4.4) and Eq. (4.5)), we have

ˆˆ

∇Tis Tjs [2] = ∇Ti Tj [4] = ∇Ti T j 01

1ˆ 0ˆ 1

T0s = (T

ˆ 0ˆ 1δ

ˆˆ

ˆˆ

T1s = (0, T 01δ , 0), N s = (0, 0, 1).

(4.11) (4.12)

(0, 1) 7→ (0, T

ˆ

ˆ

1ˆ 1δ

1ˆ 0δ

or, more concisely

, 0, T 01δ , −T 00δ , 0)

ˆ 0ˆ 1δ

,T

, −T

ˆˆ

ˆˆ ˆ0 X ˆ1 ] ∂T j 01 ∂[Xj X = ∂si ∂si ˆ0 X ˆ 1 ], = [Xji X

Observation 2 Notice that, at a transition point, the inverse of the tangent map of Π is (cf. Eq. (4.1) and (4.2)), ˆ 0ˆ 1δ

ˆˆ

j 01 j 01 ∂T j 01 ˆ ∂T ˆ ∂T + T i1δ − T i0δ , ∂si ∂ˆ s0 ∂ˆ s1

where,

where N s is the normalized normal to Is .

(1, 0) 7→ (T

ˆˆ

= T 01δ

(4.10)

, 0, 0),

ˆˆ

∂T j 01 ˆˆ = T ji 0 1 , ∂si

, 0),

by introducing the notation

where (1, 0) are (0, 1) are the coordinates of two points in the local tangent space TSIs with basis {T0s , T1s }. Algorithm 3 implements this inverse mapping.

ˆˆ

T ji 0 1 = [

Hereafter in this paper, a point in TSIs is usually specificed by its two coordiantes, say a0 and a1 , with respect to basis ˆˆ {T0s , T1s }, which is canonical frame scaled by T 01δ .

∂Xj ˆ ˆ ˆ0 X ˆ 1 ], i, j ∈ {0, 1}, X0 X1 ] = [Xji X ∂si

3 Notice that (∇ s T s )[2] = ∇ s (T s [2]), and thus the parentheses Ti j Ti j is omitted. This comment applies to all similar expression through out this paper, including the appendix.

9

q

Further, introducing the similar notations for second order derivatives with respect to sˆk ’s (k = 0, 1), T

iˆ 0k ˆ 1

T

iˆ 0ˆ 1k

ˆ0 ∂X ˆ 1 ] = [Xi X ˆ 0k X ˆ 1 ], X ∂ˆ sk ˆ ˆ 0 X1 ] = [Xi X ˆ0 X ˆ 1k ], = [Xi X ∂ˆ sk

= [Xi

p

the derivation of the covariant derivatives continue as, ˆˆ

ˆˆ

∇Tis Tjs [2] = T 01δ T ji 01 ˆ

jˆ 00 ˆ 1

+ T j 0 10 )

ˆ

jˆ 01 ˆ 1

+ T j 0 11 )

+ T i1δ (T − T i0δ (T

ˆˆ

ˆˆ

Figure 4. Why Adaptive Contouring

(4.16)

Had the contouring of the osculating quadric at transition point p been performed at the same height level as that of transition point q, the resulting pair of intersection points (intersection loop for deforming surfaces) would not have approximated the real (square shaped) one at all; consequently, the creation algorithm would have either failed or missed the real one, while the annihilation algorithm would have annihilated the wrong pair of intersection points (intersection loop).

Notice that it can be proved (though tediously and omitted here) that (∇T1s T0s )[2] = (∇T0s T1s )[2] as it should be. Through this paper, we assume the transition point is not degenerate, or det(II) 6= 0. If det(II) > 0, or the Gaussian curvature is positive, the osculating paraboloid is elliptic, and the transition point is correspondingly called to have elliptic type. On the other hand, if det(II) < 0, or the Gaussian curvature is negative, the osculating paraboloid is hyperbolic, and the transition point is correspondingly called to have hyperbolic type.

works; and consequently, some type of error bounding (of shape approximation) scheme has to be developed for this adaptive contouring. Recall that the implicit surface I is defined as the 0-set of d(s, sˆ, t) (cf. Eq. 3.1); therefore, a simple and general error estimation strategy of the second order shape approximation is to evaluate d(s, sˆ, t) at the approximated surface points and to check its deviation from 0. In what follows, we give a more satisfactory approach that bounds the error for the approximation, under the assumption that the deforming surfaces have B-spline representation. Taylor’s formula for a two variable function f , to the second order, is,

The Shape Operator and Principal Curvatures The first fundamental form, again with the local basis {T0s , T1s }, is  s s s s T0 · T0 T0 · T1 . I= T1s · T0s T1s · T1s At a transition point, this is I = kT



ˆ 0ˆ 1δ 2 

k

1 0 0 1



,

1 1 f (p) = f (0)+(p·· ∇)f (0)+ (p·· ∇)2 f (0)+ (p·· ∇)3 f (ηp), 2 3!

i.e., it is simply the scaled unit matrix. Therefore, the eigen values of the shape operator I −1 II is the same as those of the second fundamental form II. That is, two eigen values of II are the principal curvatures, denoted as κ1 and κ2 in non-descending order in this paper.

where the remainder is R(p) =

1 (p · ∇)3 f (ηp), 3!

(4.17)

for some η ∈ (0, 1). Notice that, for the height function at a transition point, the first constant term vanishes, while the second term is actually the osculating paraboloid expressed in the second fundamental form II(p, p). In the following paragraphs, we will focus on bounding the error of approximating the local shape by the osculating paraboloid, using the the remainder term as in Eq. (4.17), and exploiting the convex hull property of B-spline functions. First, let us notice that the point p ∈ TSIs in Eq. (4.17)

4.3.3 Error Bound of Second Order Shape Approximation Transition events are computed by contouring the osculating paraboloids. For efficiency, contouring is pre-computed at each transition point. However, as illustrated in Fig 4, a single contour height does not work over all transition points. Instead, at each transition point, the contouring height has to be chosen so that the actual approximation 10

the transition point of interest. Second, we need to decide exactly the size of the final tiny volume where the subdivision stops. This turns out to be different for the two different types of transition points. For elliptic case, we contour the osculating elliptic paraboloid at some desired height δt, and the sub-domain Ds in R3{s,t} , for stopping the subdivision, is a box with its two diagonal points being (p − (a0 , a1 , 0) and (p + (a0 , a1 , δt), where ai are the minor and major of the ellipse contour, and are computed readily from the two principal curvatures by 12 κi a2i = δt. Ds is mapped to the actual sub-domain in R5{s,ˆs,t} by Algorithm. 3. For hyperbolic case, we contour the osculating hyperbolic paraboloid both at height δt and −δt, resulting four hyperbolic branches. Hover, each branch will typically go far away from the origin at both directions. Therefore, the approximation is never applied to sample points that are on either of the two asymptotic directions. In our implementation, suppose the two asymptotic directions has angles −α and α, two branches are sampled at angle ranges of (−cα, cα, ((2 − c)α, pi − ((2 − c)α, and the other two are sampled symmetrically, where c is cutoff coefficient typically in(.8, .9). With this cutoff coefficient, and the two principal curvatures, we are again able to construct (with detail omitted) a sub-domain containing all the sample points for stopping the subdivision.

is in the canonical coordinates of (δs0 , δs1 ), and the derivative operator is consequently also in its canonical form as p · ∇ = δs0 ∂s0 + δs1 ∂s1 ,

(4.18)

where δsi is the deviation of the si -parameter from that at the transition point. For the sake of easy discussion, let us write δsi as δi , and ∂si f as ∂i f = fi . Therefore, Eq. (4.17) is rewritten as, 6R(p) = (δ03 f000 + 3δ02 δ1 f001 + 3δ0 δ12 f011 + δ13 f111 )(ηp), (4.19) The various derivatives are related to second order covariant derivatives of the tangent vector fields T0s and T1s by (see Eq. (H.11) and detailed proof in Appendix. H.1) ˆˆ

(T 01δ )3 fijk = ∇Tis ∇Tjs Tks [2] − 1 ˆˆ (∇Tjs T 01δ ) ∇Tis Tks [2] − T ˆ0ˆ1δ 2 ˆˆ (∇Tis T 01δ ) ∇Tjs Tks [2], ˆ ˆ 0 1δ T Notice that there are much differential operations involved in the above equation. However, we do not have to compute any of these derivatives at all; This is because, for the error bounding, we assume the deforming surfaces to have B-spline representation, and thus the detailed differential operations will be carried out automatically by NURBS symbolic computation [8, 25]. Compare this to the computing of the second fundamental form as we did in Section 4.3.2, where we performed all the differential operations to achieve the final expression of each term in the second fundamental form (Eq. (4.16)). The explicit formula for the second fundamental form makes our approach more general, in the sense that it applies as well to surfaces without B-spline representation nevertheless with some type of evaluation scheme. With all these mathematical derivation done, we can bound the RHS of Eq. (4.19) simply by bounding each Bspline term therein. To bound a B-spline function, we need to subdivide the whole domain down to some usually very small sub-domain of interest, and then apply the convex hull property. There are two issues here. First, we have to be aware that d(s, sˆ, t) is a 5-variate B-spline vector-valued function, defining essentially 3 scalar fields in the 5-space R5{s,ˆs,t} , and the implicit surface I is only the simultaneous 0-set of these scalar fields, and not a B-spline by itself. Consequently, the various differential properties (like, tangent vectors, the first and second fundamental forms, etc.), as defined on the 2-dimensional domain I, are not Bspline; however, they are B-splines when the definitions are extended to the 5-dimensional volume domain in R5{s,ˆs,t} . Therefore, the subdivision is applied recursively on the volume domain in R5{s,ˆs,t} until some tiny volume containing

4.3.4 Heuristically Uniform Sampling of Local Height Contours To compute various transition events, the height contour curves of the local osculating quadric need to be sampled, with approximate uniform spacing in the metric of the working space R3 . Suppose we are sampling the height contour with the time deviation δt. First, by Eq. (4.15), the sample point pv ∈ TSIs along a direction v ∈ TSIs , is s 2δt v. (4.20) pv = II(v, v) ˆˆ

Second, a point p ∈ TSIs is mapped to T 01δ (p[0]X0 + ˆˆ p[1]X1 ) in the working space, where T 01δ actually can be ignored if only the comparison of the distance is performed. Therefore, we have the following algorithm, which generates a list of heuristically uniform sample points, given an initial list of sample directions. Algorithm 4 Heuristically Uniform Sampling 1. Turn the given list of sample directions into q list of sam2δt ple points by scaling each element p by II(p,p) .

2. Find in the current list, a neighboring sample pair p, q ∈ TSIs with maximal distance in the working space R3 .

11

q 2δt 3. Let m = p+q 2 , scale m by II(m,m) , and insert it into the list in between p and q.

t1 t01 = tp + δtp

4. If not enough sample points, or the distances are not approximately uniform, goto Step 2.

tp

4.3.5 Compute Transition Events

p

t2

Compute Creation Events If det(II) > 0 (or equivalently, the Gaussian curvature is positive), the osculating quadric (Eq. (4.15)) is an elliptic paraboloid, and the transition point has elliptic type. See Fig. 3(a). For an upward elliptic type and offset surfaces deforming forward, or for a downward elliptic type and offset surfaces deforming backward, there is a creation event occurring, i.e. a new intersection loop is created from nothing. The following algorithm initializes the intersection loop at the time deviation δt from the transition point.

Figure 5. Evolve to Annihilate

1. Put directions (1, 0), (0, 1), (−1, 0) into the ordered list of directions V .

A close-up of transition point p in Fig. 4. Deforming the surfaces with a small time step from t1 to t2 , there will be an annihilation event related to transition point p, i.e., there will be one intersection loop that exists originally at time t1 to disappear at time t2 . However, the inclusion test, if applied right at time t1 , will annihilate the wrong intersection loop (colored cyan). On the other hand, evolving first to the time point t01 that is δp away from p (δp is the height of the osculating elliptic paraboloid where contouring gives good approximation), the inclusion test will annihilate the right intersection loop (colored in dark red). Notice that illustrated are two deforming curves intersecting into two pairs of intersection points.

2. Call Algorithm 4 to transform V to a ordered list of uniform samples in TSIs .

Algorithm 6 Compute Annihilation Event

Algorithm 5 Compute Creation Event

3. Copy and negate in order all elements, except the first and the last ones, in V, and append to itself.

1. If there is currently only one intersection loop, that is the one to annihilate. Return.

4. Call Algorithm 3 to map V to a ordered list of samples in R4{s,ˆs,t} .

2. Evolve all intersection loops to the time point that is δtp away from the considered transition point p

Pre-computation of Transition Events For efficiency consideration, the newly created intersection loop at an elliptic transition point p, or the hyperbolic-like branches at a hyperbolic transition point p (to be discussed shortly), are typically pre-computed with regard to some time deviation δtp from p (cf. Section 4.3.3). At run time, the actual creation of a new loop corresponding to a time deviation δt is achieved simply by evolving the pre-computed one by δt − δtp (the computation of a switch event also requires evolution, but more complicated. More details in a moment). Notice that, if the actual time deviation δt (from the considered transition point) is so small that the refinement algorithm (after evolution) would have difficulty of convergence, the new intersection loop should be computed directly by contouring the local shape at the height δt.

3. Apply inclusion test (of p, with t-component ignored) to each loop [26]. Find the one that p locates to annihilate. Notice this simple algorithm will not annihilate a wrong intersection loop as illustrated (for deforming curve case) in Fig. 5, because, before applying inclusion test, all loops are evolved close enough to transition point p so that the second order approximation to the local shape gives the right result. Compute Switch Events If det(II) < 0 (or equivalently, the Gaussian curvature is negative), the osculating quadric (Eq. (4.15)) is a hyperbolic paraboloid, and the transition point has hyperbolic type. See Fig. 3(b). Deforming across a hyperbolic transition point is a quite different situation from that of an elliptic point. What happens now is the switch of two pairs of hyperbolic-like segments (cf. Fig. 2). Each segment is a height contour (of height δt or −δt appropriately) of the local shape approximated by the osculating hyperbolic paraboloid. The angle range of each segment is bounded by the two asymptotic

Compute Annihilation Events At an upward elliptic transition point when offset surfaces deform backward (in time), or at a downward elliptic transition point when offset surfaces deforming forward, there is an annihilation event happening, i.e. an intersection loop collapses and disappears. See Fig. 3(a). 12

directions. The following algorithm initializes one pair of the height contour.

0 S21

S21

Algorithm 7 Sample at Hyperbolic Transition Points 1. Put directions u0 + (u1 − u0 ) ∗ λ, u0 + u1 , u1 + (u0 − u1 ) ∗ λ into the ordered list of directions V. 2. Call Algorithm 4 to transform V to an ordered list of uniform samples in TSIs .

H12

S41

S23

H34

3. Copy and negate in order all elements into another list V 0. 4. Call Algorithm 3 to map V to an ordered list of samples in R4{s,ˆs,t} . Do the same thing for V 0 . In the algorithm, u0 and u1 are the two asymptotic directions, which can be solved (for u) from the equation II(u, u) = 0 using the second fundamental form in Eq. (4.14). The other pair of contour, with the opposite height value, can be sampled similarly, with one of the asymptotic direction reversed. The actual computation of switch event is similar to the annihilation event at an elliptic transition point, i.e., by pre-computing of the two pairs of hyperbolic contours and curve matching. When the deformation, from time point t1 to time point t2 , crosses a transition point p of hyperbolic type, there will be a split event if the deforming direction is the same as the outward normal direction at p, and there will be a merge event otherwise. The following algorithm for a split event assumes that, of the 2 pairs of pre-computed hyperbolic segments at p at time deviation of δtp , the one that is below p (with respect to the deforming direction) is H41 and H23 , and the other is H12 and H34 .

S43

0 S43

Figure 6. Computation of Split Events Remark 5 Algorithm 8 requires a way to match two curves, each represented as a set of sample points. Discrete curve matching, in our context, is fairly simplemainly because the considered curves are not translation-invariant. We measure the distance of two curves as the average minimal distances from all points of one curve (this has to be the curve segment, when it is matched against a whole loop) to the other, and claim the pair with minimal distance to match each other. Because we contoured the hyperbolic paraboloid at a height δtp with guaranteed error control, this matching should be robust enough so long as enough sample points exist for each curve (if not, sample points are inserted, cf. Section 2.1). Furthermore, in case there are two pairs of curves with inconclusive distance comparison (e.g., in the same order), we still have a simple way to break the tie. Notice that if a pair of intersection curves do match, any minimal distance pair of points can be brought to exactly the same point by the classical marching algorithm for intersection curves [2, 4].

Algorithm 8 Compute the Split Event (cf. Fig. 6) 1. Evolve H41 and H23 at tp − δtp to S41 and S23 at t1 . 2. Find one of the current intersection loop, denoted as L, which have two segments that best match S41 and S23 . Cut these two matched segments from L, and denote the remained two as S21 and S43 , with the subscripts computed appropriately from the matching ends information.

Finally, Fig. 7 gives an example of split event of two deforming torus-like surfaces.

0 0 3. Evolve S21 and S43 at t1 to S21 and S43 at tp + δtp . 0 Merge S21 with H12 to form a new loop L0 , and merge 0 S43 with H34 to form a new loop L1 .

5 Other Transition Events So far, we have been discussing the intersection of two deforming closed surfaces. In this section, we will discuss extra transition events relating to the surface boundaries, which are assumed to be iso-curves with respect to the parameterization. Furthermore, we will also consider transi-

4. Evolve all loops until t2 . The algorithm for a merge event is similar and is omitted here. 13

surfaces have the same tangent at the corresponding intersection point P (cf. Remark 3). In this section, We will discuss three extra types of transition points namely, boundary transition points, vertex transition points, and triplepoint transition points. Notice that, while they all delineate the topological change to the intersection curves just as a critical point does, none of them are critical points (of the height function).

5.1 Transition Events at Boundaries We assume the generic situation that a critical point can not be on the boundary; or put in another way, the tangent plane at any point of a boundary of I is not orthogonal to the vertical t-axis. Therefore, all the extra transition events at the boundary discussed below are actually evolution in the sense that the intersection curve segment under consideration evolves exactly by the evolution vector field as discussed in Section 2. However, a purely evolution will not guarantee that the two end points of the intersection curve segment move exactly along the boundary of I, which is required for keeping the correct topology of the intersection curves (more details shortly). 5.1.1 Transition at internal extreme boundary points The transition is either a creation/annihilation event for a convex point or a split/merge event for a concave point. See Fig. 8(a). Detection of Transition Points We consider only the boundary curve of I with s1 = c1 . Denote this boundary curve as I s1 . I s1 is actually the s1 -iso-curve discussed in Section 4.1, with the tangent vector (cf. Eq. (4.1)), T s1 = (T

ˆ 0ˆ 1δ

, 0, − T

0ˆ 1δ

ˆ

ˆˆ

, T 00δ , − T 001 ).

(5.1)

Therefore, the transition points at a boundary curve with s1 = c1 can be detected as the 0-set of the following rational system with 5 constraints in 5 variables,

Figure 7. Transition: A split event of 2 deforming torus-like surfaces

ˆ s, t) = 0, X(s, t) − X(ˆ s1 = c 1 , T

tion events related to triple-points of three local intersecting surfaces.

0ˆ 0ˆ 1

=0

Remark 6 Geometrically, a boundary transition point p is the touching point of corresponding boundary curve of I with the horizontal hyper-plane. In the working space, the corresponding boundary curve of one surface touches the other surface at the corresponding point P , which is readily ˆˆ ˆ0 X ˆ 1 ] = 0. verified from the condition T 001 = [X0 X

At this point, some comments regarding transition points are in order. The transition points we have been talking so far are the critical points of height function on I. Geometrically, the tangent plane to I at a critical point p is orthogonal to the vertical t-axis; furthermore, in the working space where the surfaces are embedded, the two 14

 p      p 0         p1                         

                                                                                p                                    p 0               p 1                                               

points of intersection curve segments; specifically, ˆˆ

δs0 = −

T 01δ , T 0ˆ0ˆ1

δs1 = 0, ˆ

T 01δ , T 0ˆ0ˆ1 ˆ T 00δ δˆ s1 = − , T 0ˆ0ˆ1 δˆ s0 =

(a) Transition at Boundary: Creation/Annihilation or Split/Merge

       p                               p    p  0            1                                               

























































































































p





































































p









p

















0











1



























































Transition Computation To perform second order differential computation, on the boundary curve I s1 , we again project it into R3{s,t} , or equivalently into R2{s0 ,t} because s1 is constant. By Eq. (4.16) ˆˆ

ˆˆ

ˆ

ˆ ˆ

∇T s1 T s1 [2] = −T 01δ T 00 01 +

(b) Transition at Vertex: Creation/Annihilation or Split/Merge

ˆˆ

T 01δ (T 000 1 + T 0010 ) +

                                       P                 1                          P                                              P                 0                                                                                                               

ˆ

− T 00δ (T

0ˆ 01 ˆ 1

ˆˆ

+ T 0011 ).

Consequently, the curvature is κs 1 =

∇T s1 T s1 [2] . T s1 · T s1

With curvatures available, the created pair of boundary intersection points, up on a deviation of δt from the transition point, are, r

2δt , κs 1

(c) Evolution-Jump at Vertex

δs0 = ±

Figure 8. Transition Events on Boundaries

and δˆ si ’s can be computed from δs0 using Eq. (5.1).

Shaded is the local implicit surface I, approximated by its tangent plane at p, where p is (a) an internal extreme (with regarding to the coordinate t) point of its boundary curves, (b) an extreme vertex on its boundary and (c) a non-extreme vertex on its boundary. The tangent plane to I at p is not horizontal, generically (cf. that at a critical point). The solid horizontal line is its intersection with the horizontal hyper-plane. Notice that, all these figures, can be explained as perfectly in the context of the working space; specifically, the shaded surface is regarded as the tangent plane of one of the local surface, and the horizontal line is its intersection with the tangent plane of the other surface.

5.1.2 Transition at an extreme vertex The transition appears exactly the same as that of internal extreme points, except its implementation is even simpler because no second order differential computation on the vertex is required. The creation of the pair of end points is simply achieved by evolving on the two associated boundary curves. The transition is either creation/annihilation for convex vertexes or split/merge for concave vertexes. See Fig. 8(b). 5.1.3 Jump of evolution at a non-extreme vertex on the boundary There is actually no transition at all. The evolution of the end point, though, need to be switched to the other boundary curve. See Fig. 8(c).

Evolution Vectors The tangent vector field on I s1 also serves as the evolution vector field for evolving the end 15

rational system, ˆ − X = 0, X ¯ − X = 0. X Equivalently, T can also be regarded as the zero set of mapping f : R7{s,ˆs,¯s,t} −→ R6 , the Jacobian of which is 

−X0 −X0

ˆ0 X 0

−X1 −X1

ˆ1 X 0

0 ¯0 X

0 ¯1 X

ˆ δU ¯ δU



(5.2)

where

(a) Intersection curve (IC) of 2 surfaces touches the 3rd surface

ˆ =U ˆ − U, δU ¯ ¯ δU = U − U, and all elements are regarded as column vectors with 3 components, or 3 × 1 sub-matrices. In the following, we use similar triple scalar product notations (T ’s) as first introduced in Section 4.1; notice however, that now the superscripts relate to 3 surfaces and two δU ’s. (b) IC pierces 3rd elliptic surface

Tangent Vector Field The tangent vector manifold in 7-space is, e0 e1 e2 e3 e4 e5 ˆ0 X ˆ1 0 T = −X0 −X1 X 0 −X0 −X1 0 ¯0 X ¯1 0 X

(c) IC pierces 3rd hyperbolic surface

t

of the 1e6 ˆ δU ¯ δU

,

where ei ’s in the first row form the canonical frame of R7 , and all the rest elements are vectors (with 3 components) in the column form. The 6 tangent components can be computed from the determinants of their corresponding 6 × 6 sub-matrices, using the result detailed out in Appendix H.2; Specifically, by Eq. (H.14), δU ˆ ˆ0 X ˆ1 0 X1 X 0 T [0] = ¯ ¯0 X ¯1 δU X1 0 0 X ¯¯¯

ˆ ˆ

(d) Creation/Annihilation of pair of triple-points in R7{s,ˆs,¯s,t}

ˆˆˆ

¯¯

ˆ1 X 0

0 ¯0 X

= −T 110 T δ01 − T δ10 T 101 ,

Figure 9. Transition Events for Triple-Points

ˆ δU ¯ δU

X T [1] = 0 X0

(a),(b) and (c) show triple-points of 3 local surfaces in the working space. The first two surfaces, in (a), are only shown for their tangent planes, and in (b) and (c), are only shown for the tangent line of their intersection curve. (d) shows a triple-point in the augmented parametric space.

ˆ ˆˆ

ˆ0 X 0 ¯¯

¯¯¯

ˆˆ

= −T 1δ 0 T 001 − T 010 T δ01 ,

X T [2] = − 0 X0

5.2 Transition Events for Triple Points

=T

Formulation in the Augmented Parametric Space Three surfaces intersect locally, in general, into one intersection point called a triple point. Assuming the third de¯ s, t) = x ¯ s), the locus of forming surface is X(¯ ¯(¯ s) + tU(¯ triple points T , over time, is the zero set of the following

ˆ 11δˆ

X1 X1 ¯¯

ˆ1 X 0

ˆˆ

0 ¯0 X ¯¯

0 ¯1 X ˆ

¯¯¯

T 001 + T 01δ T 101 + T 011 T δ01 ,

X T [3] = − 0 X0 ˆ

= −T 010 T

16

ˆ δU ¯ δU

0 ¯1 X

X1 X1 0¯ 1 δ¯¯

ˆ0 X 0 ˆ

ˆ δU ¯ δU

0 ¯0 X

ˆ

¯¯

0 ¯1 X

ˆˆ

¯¯

+ T δU 10 T 001 + T 0δ0 T 101 ,

and by Eq. (H.15), X X1 X ˆ ˆ0 X ˆ 1 0 δU T [4] = 0 ¯ ¯ 1 δU X0 X1 0 0 X ¯ ¯ 1 δU X0 X1 X 0 0 = − ˆ ˆ0 X ˆ1 X0 X1 0 δU X ˆ X ¯ 1 ] [δU ˆ0 X ˆ 1 ]+ = −[X0 X1 X

¯ ) (X ¯ 1 × δU ˆ0 × X ˆ 1 )], [(X0 × X1 ) (X

X X1 X ˆ ˆ 1 0 δU ˆ0 X T [5] = − 0 ¯ ¯ X0 X1 0 0 X0 δU ¯ ¯ 0 δU X0 X1 X 0 0 = ˆ ˆ0 X ˆ1 X0 X1 0 δU X ˆ X ˆ 1 ]+ ¯ 0 ] [δU ˆ0 X = [X0 X1 X

Creation of Pair of Triple Points To perform the second order differential computation on T at a transition point p, we first choose a non-vanishing component, say s0 , and project T into the 2-space R2{s0 ,t} , denoted as T s0 . Projected from T , T s0 has a tangent vector field T s0 = (T [0], T [6]). At the transition point p,



s0

∇TT s0 [2] = ∇TT [6] ˆN ¯ ] + T [2+j] [N N ˆj N ¯ ] + T [4+k] [N N ˆN ¯k ], = T [i] [Ni N where Einstein summation is used, and the indexes to various normals represent the corresponding partial derivatives ˆ1 = ∂ Nˆ ). Consequently, the curvature of T s0 at (e.g., N ∂ sˆ1 the transition point is



s0

∇T s [2] κT s0 = T s00 2 |T | ˆN ¯ ] + T [2+j] [N N ˆj N ¯ ] + T [4+k] [N N ˆN ¯k ] T [i] [Ni N = 2 (T [0])

¯ ) (X ¯ 0 × δU ˆ0 × X ˆ 1 )], [(X0 × X1 ) (X

ˆ0 X ˆ1 0 X 0 ¯0 X ¯1 0 0 X ˆ0 × X ˆ 1 ) (X ¯0 × X ¯ 1 )] = [(X0 × X1 ) (X

X T [6] = 0 X0

X1 X1

ˆN ¯ ], = [N N

The local curve can be approximated with its osculating parabola, 1 δt = (δs0 )2 . 2 Therefore, upon a time deviation of δt from that of transition point p, the newly created pair of triple-points, denoted as p− and p+ , or succinctly p± , is, s 2δt p± [0] = p[0] ± T [0]. ∇TT [6]

(5.3)

ˆ and N ¯ denote the correwhere, in the last equation, N, N sponding normals of the 3 surfaces. Remark 7 If T [6] 6= 0, the Jacobian matrix, i.e., (5.2), has full rank of 6, and thus T is a well defined 1-manifold in 7-space. On the hand, if T [6] = 0, we would like point out that, generically, none of the other tangent components can vanish as well; and again, T is a well defined 1-manifold in 7-space.

The other components of p± can be recovered from the inverse projection, and it turns out, s 2δt p± [i] = p[i] ± T [i], ∇TT [6]

Detection of Transition Points At transition point, the tangent vector of T has vanishing t-component. Therefore, transition points of triple-points are detected as the 0-set of the following rational system,

for i = 0, · · · , 5 4 . Fig. 9 illustrate the transition event of triple-points.

6 Comments Points

ˆ − X = 0, X ¯ X − X = 0, ˆ0 × X ˆ 1 ) (X ¯0 × X ¯ 1 )] = 0, [(X0 × X1 ) (X

on

Degenerate

Transition

The formulation in this paper assumes that the critical points of the height function (i.e., f (s, sˆ, t) = t) on the implicit manifold I in R5{s,ˆs,t} , is non-degenerate. This is essentially to assume that the height function is morse [20], which is very reasonable mathematically. However, in the CAD or other areas with artificial shapes, various types of

of 7 constraints with 7 variables. Remark 8 Geometrically, the horizontal hyper-plane touches T at a transition point p of triple points in R7{s,ˆs,¯s,t} . In the working space, at the point P correspond to p, any one of the three surfaces touches the intersection curve of the other two surfaces. See Fig. 9.

4 At this point, it is easy to see that the specific projection we chose earlier actually have no effect on the final result, and the projection actually does not have to be carried out at all.

17

degeneracy is not uncommon. Similar comments as that for the degenerate transition points of surface slicing [13] apply here as well: it seems to be very difficult to have a single implementation that would deal with all the degeneracy situations as well as the generic situation. Nevertheless, mathematically, the extension of the approach developed in this paper to deal with the non-generic situations seems to not require much effort. Below, we list a few common nongeneric situations.

evolution could have been done by front-propagating on I. We found, however, a much simpler way that constructs an evolution vector field directly in the working space R3 and evolves the intersection curves accordingly. We also presented similar formulation for tracking the intersection curve end points that correspond to surface boundaries, and for tracking the triple-points that correspond to three local surfaces. We will extend our work in the future to include the detection and computation of transition events relating to the self-intersection singularity of surface offsetting, either with the tradition unit normal offset vector field, or with the general one as assumed in this paper.

1. Parabolic Points: There is actually no topological change across a transition point of parabolic type. On the other hand, the evolution will fail if the evolution vector is evaluated exactly at the parabolic point. Avoiding evolving any intersection point close (within some tolerance) to the parabolic point is all that need to get the algorithm back to normal.

References [1] K. Abdel-Malek and H. Yeh, “Determining intersection curves between surfaces of two solids,” Computer-Aided Design, vol. 28, no. 6-7, June-July 1996, pp. 539–549.

2. Monkey Saddle Points: Deforming across such a point, there will be either a split event where an existing loop splits into 3 loops, or a merge event where 3 existing loops approach and merge into one loop. Both events are computed using 3rd order differential computation.

[2] C. L. Bajaj, C. M. Hoffmann, R. E. Lynch, and J. E. H. Hopcroft, “Tracing surface intersections,” Computer Aided Geometric Design, vol. 5, no. 4, November 1988, pp. 285– 307.

3. 1-Dimensional Transition Set: If the transition points in the set are all maxima or all minima, the situation is almost the same as 0-dimensional elliptic point except that now a pair of intersection loops is either created or annihilated. A typical example of this situation is a torus deforming across its touching circle with the table. The other situations resemble hyperbolic points or parabolic points, and are more complicated.

[3] R. E. Barnhill, G. Farin, M. Jordan, and B. R. Piper, “Surface/surface intersection,” Computer Aided Geometric Design, vol. 4, no. 1-2, 1987, pp. 3–16. [4] R. E. Barnhill and S. N. Kersey, “A marching method for parametric surface/surface intersection,” Computer Aided Geometric Design, vol. 7, no. 1-4, 1990, pp. 257–280. [5] J. Damon, “On the Smoothness and Geometry of Boundaries Associated to Skeletal Structures I: Sufficient Conditions for Smoothness,” Annales Inst. Fourier, vol. 53, 2003, pp. 1941–1985.

4. 2-Dimensional Transition Set: This can be converted to the situation of 1-dimensional transition set by simply considering only the boundary of the set.

[6] J. Damon, “On the Smoothness and Geometry of Boundaries Associated to Skeletal Structures II: Geometry in the Blum Case,” Compositio Mathematica, vol. 140, no. 6, 2004, pp. 1657–1674.

7 Conclusion

[7] J. Damon, “Determining the Geometry of Boundaries of Objects from Medial Data,” IJCV, vol. 63, no. 1, 2005, pp. 45–64.

In this paper, we have developed a mathematical framework for continuously and robustly tracking the intersection curves of more than one deforming surfaces, on the assumption that both the base surfaces and the deforming vectors have rational parametrization. The core idea is to formulate the totality of intersection curves of 2 deforming surfaces as an implicit 2-manifold I in the augmented (by time domain t) parametric space. The topological change of the intersection curves is detected at transition points on I where the tangent spaces are orthogonal to t-axis, and computed subsequently by 2nd order differential computation. Away from any transition points, the intersection curves evolve without any structural change. The

[8] G. Elber, “Free Form Surface Analysis using a Hybrid of Symbolic and Numeric Computation,” Ph.D. thesis, University of Utah, Computer Science Department, 1992. [9] G. Elber and M.-S. Kim, “Geometric constraint solver using multivariate rational spline functions,” Symposium on Solid Modeling and Applications, 2001, pp. 1–10. [10] R. Goldman, “Curvature formulas for implicit curves and surfaces,” cagd, vol. 22, no. 7, 2005, pp. 632–658. [11] B. Hamann, “Visualization and Modeling Contours of Trivariate Functions, Ph.D. thesis,” Arizona State Univeristy, 1991.

18

[31] G. Xu and C. L. Bajaj, “Curvature Computations of 2Manifolds in Rk ,” .

[12] M. E. Hohmeyer, “A surface intersection algorithm based on loop detection,” Proceedings of the first ACM symposium on Solid modeling foundations and CAD/CAM applications. May 1991, pp. 197–207, ACM Press.

[32] Y. Yamaguchi, R. Kamiyama, and F. Kimura, “Surfacesurface intersection with critical point detection based on B´ezier normal vector surfaces,” Geometric Modeling: theoretical and computational basis towards advanced CAD applications, F. Kimura, ed. 2001, pp. 325–342, Kluwer Academic Publishers.

[13] C.-S. Jun, D.-S. Kim, D.-S. Kim, H.-C. Lee, J. Hwang, and Tien-ChienChang, “Surface slicing algorithm based on topology transition,” Computer-Aided Design, vol. 33, no. 11, 2001, pp. 825–838. [14] J.W.Bruce and P.J.Giblin, Curves And Singularities, 2 edition, Cambridge University Press, 1992.

H Appendices

[15] J. J. Koenderink, Solid Shape, MIT press, 1990.

H.1 Proof of the Remainder in Taylor’s Formula

[16] G. A. Kriezis, N. M. Patrikalakis, and F. E. Wolter, “Topological and differential-equation methods for surface intersections,” Computer-Aided Design, vol. 24, no. 1, January 1992, pp. 41–55.

H.1.1 2rd Order Term First we show the well known result, i.e., the second term in Taylor’s formula Eq. (??) is exactly the second fundamental form (scaled by 12 ). The second order term in Taylor’s formula (with the constant 12 discarded) can be rewritten as

[17] S. Lang, Undergraduate Analysis, 2 edition, Springer, 1997. [18] T. Maekawa, “An overview of offset curves and surfaces,” Computer-Aided Design, vol. 31, no. 3, March 1999, pp. 165–173. [19] R. P. Markot and R. L. Magedson, “Solutions of tangential surface and curve intersections,” Computer-Aided Design, vol. 21, no. 7, September 1989, pp. 421–427.

f00 δ02 + 2f01 δ0 δ1 + f11 δ12 .

[20] M. Morse and S. S. Cairns, Critical point theory in global analysis and differential topology, Academic Press, 1969.

(H.1)

Notice that the function f acutally defines the local Monge patch, and as such, defines also two tangent vector fields on the patch,

[21] L. R. Nackman, “Two-Dimensional Critical Point Configuration Graphs,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 6, no. 4, July 1984, pp. 442–450.

V0 = (1, 0, f0 ),

[22] B. O’Neill, Elementary Differential Geometry, 2 edition, Academic Press, 1997.

V1 = (0, 1, f1 ).

[23] Y. Ouyang, M. Tang, J. Lin, and J. Dong, “Intersection of two offset parametric surfaces based on topology analysis,” Journal of Zhejiang Univ SCI, vol. 5, no. 3, 2004, pp. 259– 268.

In a more concise way, the two vector fields can be specified as,

[24] B. Pham, “Offset curves and surfaces: a brief survey,” Computer-Aided Design, vol. 24, no. 4, April 1992, pp. 223– 229.

and the other component being 0. Notice that, in the equation, i can be either 0 or 1, and so do indexes j and k through this whole appendix. The covariant derivatives are,

Vi [i] = 1, Vi [2] = fi ,

[25] L. A. Piegl and W. Tiller, “Symbolic operators for NURBS,” Computer-Aided Design, vol. 29, no. 5, 1997, pp. 361–368.

∇Vi Vj [2] = ∇Vi fj ∂fj ∂fj = + fi ∂si ∂f ∂fj  ∂fj + f1 = fij + fi f0 ∂s0 ∂s1 = fij + f0 fi f0j + fi f1 fj1

[26] F. P. Preparata and M. I. Shamos, Computational geometry: an introduction, Springer-Verlag, 1985. [27] T. W. Sederberg, H. N. Christiansen, and S. Katz, “Improved test for closed loops in surface intersections,” ComputerAided Design, vol. 21, no. 8, 1989, pp. 505–508. [28] T. W. Sederberg and R. J. Meyers, “Loop detection in surface patch intersections,” Computer Aided Geometric Design, vol. 5, no. 2, July 1988, pp. 161–171.

(H.2)

(H.3)

and thus, at transiton point where f0 = f1 = 0, relate to the derivatives in Eq. (H.1) by,

[29] O. Soldea, G. Elber, and E. Rivlin, “Global Curvature Analysis and Segmentation of Volumetric Data Sets using Trivariate B-spline Functions,” Geometric Modeling and Processing 2004, April 2004, pp. 217–226.

fij = ∇Vi Vj [2].

(H.4)

Suppose, in general, there are another two vector fields, defined from V0 and V1 by some functions φ0 and φ1 on the patch, as

[30] J.-P. Thirion and A. Gourdon, “Computing the Differential Characteristics of Isointensity Surfaces,” Journal of Computer Vision and Image Understanding, vol. 61, no. 2, March 1995, pp. 190–202.

Vˆi = φi Vi . 19

For the specific vector fields {T0s , T1s }, φ = ψ = J 234 and thus,

The covariant derivatives of the scaled vector fields are, ∇Vˆi Vˆj = φi ∇Vi (φj Vj ) = φi (∇Vi φj )Vj + φi φj ∇Vi Vj

∇Tis ∇Tjs Tks [2] = (J 234 )2 (∇Vj J 234 ) ∇Vi Vk [2] +

(H.5)

2(J 234 )2 (∇Vi J 234 ) ∇Vj Vk [2] +

Noticing that, at the considered transition point, f0 = f1 = 0 or V0 [2] = V1 [2] = 0, ∇Vˆi Vˆj [2] = φi φj ∇Vi Vj [2].

(J 234 )3 ∇Vi ∇Vj Vk [2]. Substituting Eq. (H.9) and Eq. (H.5), and reorganizing, yield

(H.6)

By Eq. (H.4), 1 ∇ ˆ Vˆj [2]. fij = φ i φ j Vi

(J 234 )3 fijk = ∇Tis ∇Tjs Tks [2] −

(H.7)

1

(∇Tjs J 234 ) ∇Tis Tks [2] − J 234 2 (∇Tis J 234 ) ∇Tjs Tks [2]. (H.10) J 234

fields {T0s , T1s } 234

Now taking the specific vector as the scaled vector fields, then φ = ψ = J . Further, let (a0 , a1 ) be the coordinates with respect to the local basis of 0 1 {Tˆ0s , Tˆ1s }, i.e., a0 = Jδ234 and a1 = Jδ234 , where J 234 is evlauated at the transition point. Eq. (H.1) can be rewritten as,

Noticing that all the indexes (i, j, k) have to be either 0 or 1, and that the order of indexes in either fijk or ∇Tis ∇Tjs Tks actually does not matter, we can assume i = j. Specifically, (J 234 )3 fiij = ∇Tis ∇Tis Tjs [2] − 3 (∇Tis J 234 ) ∇Tis Tjs [2], J 234

∇T0s T0s [2] a20 + 2∇T0s T1s [2] a0 a1 + ∇T1s T1s [2] a21 , or equivalently, a0



 a1 

N · ∇TˆsTˆ0s 0 N · ∇TˆsTˆ0s 1

N · ∇TˆsTˆ1s 0



where we have also changed k into j.

   a0  a , 1 N · ∇TˆsTˆ1s

H.2 Compute the Determinant of a 6 × 6 matrix

1

where N = (0, 0, 1) is the normal at the transition point. Therefore, we have already proved that the second order term in Taylor’s formula is actually 21 II(a, a).

Let a b c d 0 F = m n p q e

H.1.2 3rd Order Term

0 , f

(H.12)

where all elements are column vectors of 3 components. First, let us assume c is not spanned by a and b, or equivalently, a, b and c form a local basis; consequently,

The third order term in Taylor’s formula (with the constant 1 3! discarded) can be rewritten as f000 δ03 + 3f001 δ02 δ1 + 3f011 δ0 δ12 + f111 δ13 .

(H.11)

d = ξ0 a + ξ1 b + ξ2 c,

(H.8)

(H.13)

where

By Eq. (H.2) and Eq. (H.3), we have, at the transition point where fi = 0,

ξ0 =

∇Vi ∇Vj Vk [2] = ∇Vi (fjk + f0 fj f0k + fj f1 fk1 ) ∂(fjk + f0 fj f0k + fj f1 fk1 ) ∂si (H.9) = fijk =

On the other hand, by Eq. (H.5),  ∇Vˆi ∇Vˆj Vˆk = φi ∇Vi φj (∇Vj φk )Vk + φi ∇Vi (φj φk ∇Vj Vk ); consequently, at the transition point where Vk [2] = fk = 0,

[adc] [abd] [dbc] , ξ1 = , ξ2 = . [abc] [abc] [abc]

Thus, the matrix in Eq. (H.12) can be converted into a block-triangular form by eliminating d by some appropriate column operations using Eq. (H.13); specifically a b c 0 0 0 F = m n p q − ξ 0 m − ξ1 n − ξ2 p e f = [abc] [(q − ξ0 m − ξ1 n − ξ2 p)ef ]

= [abc][qef ]−ξ0 [abc][mef ]−ξ1[abc][nef ]−ξ2[abc][pef ]

Substituting the expressions for ξi ’s yields

∇Vˆi ∇Vˆj Vˆk [2] = φi φj (∇Vj φk ) ∇Vi Vk [2] + φi (∇Vi φj )φk ∇Vj Vk [2] +

F = [abc] [qef ] − [dbc] [mef ]

φi φj (∇Vi φk ) ∇Vj Vk [2] + φi φj φk ∇Vi ∇Vj Vk [2]

− [adc] [nef ] − [abd] [pef ] 20

(H.14)

Now, assume c is spanned by a and b, but d is not. In this situation, we decompose c with respect to the basis {a, b, d}, and the derivation would have been exactly the same if the 2-th column and the 3-th columns in Eq. (H.12) were exchanged, and the c and d, as well as p and q were switched. Therefore, Eq. (H.14) holds as well. Finally, we consider that situation that both c and d are spanned by a and b; that is, both c and d are linear combination of a and b. Thus, both elements c and d the RHS of Eq. (H.12) can be eliminated by column operation without involving the last columns. The resulting blocktriangular matrix has the determinant of its top left block being 0, and thus F = 0. However, under the assumpution, Eq. (H.14) vanishes as well. If m = a, n = b, a b c d 0 0 a b p q e f = [abc][qef ] − [dbc] [aef ] − [adc] [bef ] − [abd] [pef ]

= [abc][qef ] + [acd] [bef ] − [bcd] [aef ] − [abd] [pef ]

= [abc][qef ] + [([acd] b − [bcd] a) ef ] − [abd] [pef ] = [abc] [qef ] + [(a × b)(c × d) (e × f )] − [abd] [pef ]

(H.15)

21