trimming for subdivision surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing...

20
Trimming for Subdivision Surfaces Nathan Litke a,1 Adi Levin b,2 Peter Schr¨ oder a,3 a Caltech, Pasadena, CA 91125, USA b Tel Aviv University, Tel Aviv 69978, Israel Abstract Trimming is an important primitive operation in geometric modeling. It is also the root of many numerical and topological problems in modern NURBS based CAGD systems. In this paper we introduce a new method for trimming subdivision surfaces. It is based on the use of combined subdivision schemes to guarantee exact interpolation of trim curves. The latter ensures, for example, that if two surfaces share a trim curve, they will meet exactly at the trim curve. In contrast to traditional approaches to trimming (e.g., for NURBS) we con- struct a new control mesh with each trim operation. This causes a perturbation of the surface near the trim region, which we control through the use of multiresolution details. These are computed rapidly and at low cost with the help of a novel set of quasi-interpolation opera- tors. We demonstrate our algorithm with a number of examples. Key words: Subdivision Surfaces, Combined Subdivision, Trimming, Boundary Interpolation, Approximation 1 Introduction Subdivision surfaces are a very attractive alternative to classical NURBS (non- uniform rational B-spline) patches for free form geometric modeling. They are used increasingly in high end animation production (e.g., Pixar [1]), game engines, and are provided as primitives in many popular modeling programs (e.g., Maya, Mirai, 3D Studio Max, LightWave, etc.). One of the chief advantages and distinguishing features of subdivision is its ability to model arbitrary topology (piecewise) smooth surfaces. In contrast, classical NURBS methods require careful patch layout and cumbersome cross boundary continuity management to build complex shapes. In 1 Corresponding author. E-mail: [email protected]. 2 E-mail: [email protected]. 3 E-mail: [email protected]. Preprint submitted to Elsevier Preprint 30/6/2000

Upload: others

Post on 17-May-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

Trimming for Subdivision Surfaces

Nathan Litke a,1 Adi Levin b,2 Peter Schroder a,3

aCaltech, Pasadena, CA 91125, USAbTel Aviv University, Tel Aviv 69978, Israel

Abstract

Trimming is an important primitive operation in geometric modeling. It is also the root ofmany numerical and topological problems in modern NURBS based CAGD systems. Inthis paper we introduce a new method for trimming subdivision surfaces. It is based on theuse of combined subdivision schemes to guarantee exact interpolation of trim curves. Thelatter ensures, for example, that if two surfaces share a trim curve, they will meet exactly atthe trim curve. In contrast to traditional approaches to trimming (e.g., for NURBS) we con-struct a new control mesh with each trim operation. This causes a perturbation of the surfacenear the trim region, which we control through the use of multiresolution details. These arecomputed rapidly and at low cost with the help of a novel set of quasi-interpolation opera-tors. We demonstrate our algorithm with a number of examples.

Key words: Subdivision Surfaces, Combined Subdivision, Trimming, BoundaryInterpolation, Approximation

1 Introduction

Subdivision surfaces are a very attractive alternative to classical NURBS (non-uniform rational B-spline) patches for free form geometric modeling. They are usedincreasingly in high end animation production (e.g., Pixar [1]), game engines, andare provided as primitives in many popular modeling programs (e.g., Maya, Mirai,3D Studio Max, LightWave, etc.). One of the chief advantages and distinguishingfeatures of subdivision is its ability to model arbitrary topology (piecewise) smoothsurfaces. In contrast, classical NURBS methods require careful patch layout andcumbersome cross boundary continuity management to build complex shapes. In

1 Corresponding author. E-mail: [email protected] E-mail: [email protected] E-mail: [email protected].

Preprint submitted to Elsevier Preprint 30/6/2000

Page 2: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

Fig. 1. Example of a subdivision surface after trimming with our procedure.

practice this often leads to the appearance of kinks and cracks, especially whensuch patch complexes are animated.

Trimming is an important component of any free form surface modeling system. Itis essential for boolean operations and arises even in as simple a context as “punch-ing” a hole into the surface. In the case of NURBS a trimming operation does notchange the domain of a patch, but rather identifies a region within the domain whoseevaluation is skipped, creating the associated “hole.” This requires the computationof the pre-image of the trim curve in the parametric domain. Such computationsare notoriously difficult [2–4] and require potentially very expensive machinery toavoid topological inconsistencies such as cracks (see Section 1.1 for a more de-tailed discussion). Instead we assume a different point of view. Whenever a regionof the subdivision surface is cut in a trimming operation we construct a new do-main such that the resulting subdivision surface approximates the original surfaceaway from the trim region. The approximation error away from the trim curve canbe made arbitrarily small. The region over which it is non-zero can be made arbi-trarily small as well. The trimming curve itself is interpolated exactly through theuse of combined subdivision [5,6], avoiding any potential topological problems atthe curve itself. Because combined subdivision schemes work directly with curvesin world space we do not need to compute exact pre-images of trim curves 4 . Thisavoids the usual problems and costs associated with this operation in the traditionalapproach to trimming, and is one of the principal advantages of our method.

4 Approximate pre-images are still required to decide how to change the control mesh.

2

Page 3: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

1.1 Related work

1.1.1 Trimming NURBS patches

Trimming NURBS patches is a notoriously difficult operation and is to this dayone of the weak links in even high end commercial CAGD systems. Trimming ofNURBS patches is performed by identifying pre-images of desired world spacetrim curves in parameter space. These parameter space curves bound regions forwhich the patch evaluation is skipped. The original coefficients which define thepatch are unchanged, which ensures that the trimmed surface is coincident with theoriginal surface. The main difficulty in this approach is the reliable computationand representation of the trim curve pre-images. If the trim curve arises from theintersection of patches, the algebraic and combinatorial structure (loops) of suchcurves can be extremely complicated even for low degree polynomials. This can beaddressed with hybrid methods employing symbolic and numerical techniques [2]or methods which are mostly symbolic and use exact algebraic number represen-tations [3,4]. The latter tend to be very slow, but they guarantee accurate results,while the former are very difficult to make completely robust in all cases. If thetrim curve is defined in terms of other primitives (e.g., involving offsets) symbolicmethods may not be applicable and the only recourse is to numerical methods in-volving approximations of the trim curves. Such scenarios almost invariably leadto topological problems such as cracks in the resulting surfaces.

The main distinction between these approaches and ours is that we define a newsurface whose boundary is the exact trim curve, whatever form it might take. Thetrade-off is that the trimmed surface near the trim curve only approximates theoriginal surface. However, as will be seen later, this approximation can be madearbitrarily close to the original. Because the trim boundary is exact, topologicalproblems such as cracks at the trim curve are entirely avoided.

1.1.2 Boundary constructions for subdivision surfaces

Boundary constructions for subdivision surfaces have been described by a numberof authors [7–9]. All these constructions require that the boundary curve be a splinecurve. This is not sufficient for the representation of arbitrary trim curves, which aregenerally not splines. Instead we make use of combined subdivision schemes [5,6].Combined subdivision enables the construction of subdivision surfaces with arbi-trary boundary curves so long as the boundary curve is (I) piecewise smooth (mean-ing that the curve consists of segments with Holder continuous second derivatives);(II) parameterized; and (III) possesses an evaluation procedure. The resulting sur-faces are guaranteed to exactly interpolate the desired curve (transfinite interpola-tion). Such schemes only require the modification of subdivision stencils near theboundary in a straightforward way using data from the supplied boundary curve.

3

Page 4: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

Our subdivision surface trimming procedure is based on the use of a novel com-bined subdivision scheme which extends the classic Loop scheme [10]. This en-sures that we interpolate the desired trim curve exactly. However, since the controlmesh changes topologically we must also compute appropriate control point posi-tions, and more generally, detail offset vectors throughout the subdivision hierar-chy, so that the trimmed surface fits the original surface to a desired accuracy. Forthis purpose we introduce a new quasi-interpolation operator which is optimal inthe regular setting.

1.2 Contributions

The main contribution of this paper is a trimming procedure for subdivision sur-faces which guarantees exact interpolation of the desired trim curve. In particularthis implies that if two surfaces share the same trim curve in world space (for ex-ample, their intersection), the two surfaces will meet exactly at the trim curve andtopological inconsistencies, such as cracks during tessellation, are easily avoided.The ultimate goal of this work is to provide tools for CAGD applications whichrequire exactness. This may be contrasted with entertainment applications in whichthe exact shape of a trim curve may not be as stringent a requirement.

The development of our algorithm contains a number of additional innovations. Wedescribe

• a novel combined subdivision scheme for Loop surfaces;• quasi-interpolation operators for Loop surfaces;• a procedure to establish correspondence between two subdivision surfaces given

by control meshes with different connectivity;• an adaptive control mesh remeshing procedure;• an adaptive error control procedure based on a multiresolution surface represen-

tation with detail coefficients.

We emphasize that our algorithm does not address the full range of issues associatedwith boolean operations on subdivision surfaces. In particular we do not considerthe problem of computing surface-surface intersections in the general setting. Weassume that the desired world space trim curve is given to the algorithm. It is notrequired to lie exactly on the surface, although in practice this is generally the case.Similarly, the trim curve itself is not required to be a spline curve. Rather, the onlyrequirement is that it be piecewise smooth, parameterized, and possess an exactevaluation procedure.

4

Page 5: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

1.3 Overview

In the following sections, we develop an algorithm for trimming subdivision sur-faces. The result of applying this algorithm is a new surface with the trim regionremoved. Since the subdivision schemes found in the literature are not suitable foraccurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined subdivision scheme for boundaries to guarantee theexact interpolation of the trim curve. However, due to the change in topology, thetrimmed surface does not match the original surface near the trim curve. We cor-rect this discrepancy by introducing multiresolution detail offset vectors into thesubdivision hierarchy of the new surface. These vectors modify the control pointsgenerated by subdivision and are computed using local quasi-interpolation opera-tors in a final approximation stage of our algorithm. The fit is adaptive, producingdetail vectors only where necessary to guarantee that the trimmed surface is withina prescribed tolerance of the original surface. The resulting surface is amenable tofurther modeling, including successive trimming operations.

We will begin by describing the representation for the surfaces produced by our al-gorithm. We elected to develop our algorithm for surfaces based on Loop’s scheme.However, the construction is similar for other popular subdivision schemes, suchas Catmull-Clark. In the following sections, we discuss the stages of the algorithmwhich construct a trimmed surface of this type.

2 Surface Representation

In this section we describe a novel subdivision scheme that is based on Loop’sscheme and multiresolution details. It is the basic parametric primitive that weuse in the construction of trimmed surfaces. In addition, we present novel quasi-interpolation operators which allow us to compute detail coefficients for approxi-mation.

2.1 Combined Loop subdivision

Our subdivision scheme is based on Loop’s scheme [10], which generalizes quarticbox splines to the arbitrary topology surface setting. Loop’s scheme is defined overa closed control polyhedron by the subdivision stencils illustrated in Figure 2. Wewill refer to a control point i at level j in the subdivision hierarchy with the label pj

i .The vertex stencil is parameterized by the number of edges incident to the controlpoint, known as its valence. The limit position of a control point pj

i is denoted byLpj

i and is computed with the limit stencil in Figure 2.

5

Page 6: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

We account for surfaces with boundaries by using combined subdivision, where theunderlying surface is represented by a control polyhedron and parametric curves.Since boundary curves may be piecewise smooth, we distinguish between smoothboundary control points and corner control points. The latter may have any valence,while the former are restricted to valence four only. On the boundary, control pointspj

i are computed using a boundary curve c : [0, 1] → R3 and associated parameter

values uji . The u0

i are supplied by the user, or assigned by our algorithm when asurface is trimmed (see Section 3.1). To allow for unevenly spaced parameter val-ues, we use uniform cubic B-spline subdivision rules to obtain a sufficiently smoothparameterization. Thus for consecutively indexed control points on the boundary,

pji = c(1/6(uj

i−1 + 4uji + uj

i+1)).

Note that this simplifies to pji = c(uj

i ) for uji+1 −uj

i = const. Corner control pointsare defined as pj

i = c(uji ). The update rules for uj

i are given in Figure 3. It followsthat control points on the boundary are at their limit position, i.e. Lpj

i = pji .

To handle convex as well as concave corners correctly, we use a modification ofour subdivision rules that is similar to [9]. An interior edge adjacent to a cornercontrol point pj

c uses a modified stencil as shown in Figure 2 (right), with parameterγ = 1/2 − 1/4 cos(θk). For convex corners we define θk = φ/(k − 1) and forconcave corners θk = (2π − φ)/(k − 1), where k is the valence and φ is the anglemade by the one sided tangent vectors at the corner c(u0

c). Let pj+1i be the control

point computed with this stencil, and let p⊥ be its projection in the tangent space atc(u0

c). We control the rate of convergence near the corner by introducing a flatnessparameter s:

pj+1i = (1 − s)pj+1

i + s((1 − t)pj+1c + tp⊥)

with s = 1 − 1/(4γ + cos(π/(k − 1))) and t =∥∥∥pj+1

i − pj+1c

∥∥∥ / ∥∥∥p⊥ − pj+1c

∥∥∥. Thisvalue of s is necessary (but not sufficient) for C2 continuity.

2.2 Multiresolution detail

The trimmed surfaces that we produce must contain a sufficient number of degreesof freedom for approximation. We can capitalize on the multiresolution structureof our surfaces by storing a finite set of detail vectors in the subdivision hierarchy.Each detail vector dj

i produces a perturbation of the surface near its correspondingcontrol point pj

i , which gives us the necessary degrees of freedom. A zero detailvector has no effect on the surface, so we only store the non-zero details in a sparsedata structure. Typically, the surface for trimming provided by the user contains

6

Page 7: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

γ γ

corner

3/8

1/8

3/8

1/8

1/8

3/4-

1/8

β

β

ββ

β

ββ

1-kβ

Fig. 2. Loop subdivision rules for the interior of surfaces. The rule for vertices, ordinaryedges and edges adjacent to a corner (see the text for the weight γ) are shown on theleft, middle and right, respectively. In the vertex subdivision stencil, β = α/(8k), withα = 5 − (3 + 2 cos(2π/k))2/8 and k the valence of the center vertex. The limit positionstencil has the same form with β = α/(k(3 + α)).

1/81 1/8

u rules

1/2 1/2

d rules

1/4

1/81/8 6/8 1/4

Fig. 3. At the boundary/corner (u, d) values are propagated to finer levels as indicated bythese stencils.

no details, but in subsequent trimming operations the surface includes details com-puted for approximation.

In this new regime, letting S denote the entirety of all subdivision rules, we havepj+1 = S(pj +dj), j ≥ 0. The detail coefficients dj

i on the boundary are related tothe (one sided) second derivatives of the surface at the boundary point Lpj

i ,

dji = 1/6

(∂2

∂u2+

∂2

∂u∂v+

∂2

∂v2

)S(u, v)

∣∣∣Lpji,

where S(u, v) denotes the surface parameterized by (u, v), with u along the bound-ary curve and v transverse to the curve. Unlike the detail at interior control points,boundary detail vectors are subtracted from the control point prior to subdivision(see Figure 4 for examples showing the effect of boundary detail coefficients onthe surface near the boundary). The update rules for boundary detail coefficients inFigure 3 show that the details decay at each subdivision step. Any additional de-tails computed for finer levels are additive. From this definition, it is clear that theboundary control points converge to samples of the curve, thus in the limit exactlyinterpolating the boundary curve everywhere independent of the exact form of thecurve. If two different surfaces share boundary data they will both sample the curvein exactly the same locations ensuring a seamless tessellation.

7

Page 8: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

d = 0

Fig. 4. Influence of the vector valued detail d at an exemplary boundary control point,illustrated by the red arrows. Note the influence on the surface shape near the boundary.

2.3 Quasi-interpolation

To approximate a surface by subdivision, we must construct a control mesh with aset of control point positions and detail vectors chosen so that the associated limitsurface approximates the given surface to within some user selected bound ε > 0.The approximation algorithm chooses the detail vectors at the control points fora prescribed connectivity. There are many possible ways to do this, for examplethrough least squares fitting [7] or through interpolation constraints [11]. Eitherone of those approaches requires the solution of linear systems. Instead we opt fora purely local approach based on quasi-interpolation.

To develop this idea we begin by considering the regular setting, i.e., all controlpoints have valence six and the surface consists of quartic box splines. Given aregular mesh, which samples the desired surface A in points ai ∈ A ⊂ R

3, theusual interpolation problem is: find p such that a = Lp. a and p are the vectorsof samples and control points respectively, while L contains the limit evaluationmasks for each of the control points (Figure 2, left). Ignoring rank questions for themoment the interpolation problem may be solved as p = L−1a. In general L−1 isdense making this approach expensive.

Quasi-interpolation circumvents this problem by requiring the inversion of L onlyon the space of polynomials up to some order. The natural choice in our case isthe space of all cubic polynomials, π3, since this is the highest order polynomialspace entirely contained in the span of quartic box splines. In this case the quasi-interpolation operator Q = (L|π3)

−1 is sparse with the same structure as the vertexsubdivision stencil (Figure 5a). Q is not unique, but can be chosen to have localsupport and a low norm. For the regular setting we have the following properties ofour quasi-interpolation operator Q:

• if the ai sample a cubic surface A, then p = Qa yields control points whichreproduce the cubic surface;

• for an arbitrary surface A, LQ �= I; i.e., quasi-interpolation applied to a does notreproduce A.

8

Page 9: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

Because of the latter property we will apply Q only to samples of the differencebetween the desired surface and the surface induced by our control polyhedron.Specifically, let aj

i be samples of the desired surface, one associated with each con-trol point pj

i of the control mesh and all its refinement levels. Defining differencesas ∆j = aj − Lpj , the details are given by dj = Q∆j .

Q as given in Figure 5a is only optimal in the above sense for k = 6. At the coars-est level of the control mesh, where possibly all interior vertices are irregular, weignore this distinction. This is justified by the fact that asymptotic approximationproperties are not influenced by whatever steps we take at the coarsest level. Inpractice we have found β = −1/(2k) to work well even when k �= 6. At finerlevels almost all vertices will be regular and Q as given above will be optimal. Forthe few irregular vertices at finer levels we modify Q to be interpolating rather thanquasi-interpolating (Figure 5d), as experimental evidence suggests this gives a bet-ter approximation near extraordinary vertices. Note that for Q to be interpolating,it is applied after the surface is modified by the quasi-interpolating stencils.

The Q stencils for boundary/corner control points are shown in Figure 5. The sup-port of the boundary stencil (Figure 5b) can be reduced by removing the coefficients8 and −8. The resulting stencil only has quadratic precision, but is more efficientand works well in practice. We do not have a rule to compute proper corner de-tails. Instead the corner stencil (Figure 5c) is applied not to differences, but ratherto the detail vectors calculated at the adjacent boundary control points (or zero foran adjacent corner).

1/2

1/2

1

-8-8

8-1-1

w

00

0

0

0

00

β

β

ββ

β

ββ

1-kβ

(a) (b) (c) (d)

81 1

Fig. 5. Detail stencils for (a) interior, (b) boundary, (c) corner and (d) irregular vertices atlevels j > 0. For interior vertices, stencil (a) with β = −1/(2k) is quasi-interpolating andstencil (d) with w = (3 + α)/3 (see Figure 2) is interpolating. Note that the corner stencil(c) is applied to detail vectors rather than differences.

Figure 6 shows an example of these operators used to approximate one octant ofa sphere. The top left shows the control mesh for a combined subdivision surfacewhose boundary is given by three spherical arcs which bound an octant of a sphere1m in diameter. The associated limit surface exactly interpolates the boundarycurves, but is otherwise not close to the sphere (maximum deviation: 18cm). Weapply our quasi-interpolation operators adaptively over five levels. The resultingcombined subdivision surface with details approximates the sphere with an accu-

9

Page 10: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

racy of .3µm (L1 norm), respectively 13µm (L∞ norm). The corresponding pseudocolor error plots are shown in Figure 7. Note that the colors were rescaled for eachpseudo color plot to visualize the rapidly decreasing error. The maximum error was2cm, 4.5mm, 1mm, 262µm, 61µm, and 13µm for levels 0 through 5. The maximumerror is quickly isolated near the valence 5 vertex and the corners.

Fig. 6. Control mesh (left) and associated limit surface (middle). On the right the result ofadding detail coefficients to ensure that the resulting surface matches an octant of a sphere.

2cmL =∞ 4.5mmL =∞ 1mmL =∞

262µmL =∞ 61µmL =∞ 13µmL =∞

Fig. 7. Pseudo color images showing the successive approximation of the sphere octantby the combined subdivision surface with details computed through quasi-interpolation(Section 2.3).

10

Page 11: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

3 Trimming algorithm

In this section we describe the trimming procedure for subdivision surfaces of thetype given above. The emphasis of this procedure is on producing a trimmed sur-face which is exact to the degree required in CAGD applications. We achieve thisby limiting the deviation between the original surface and the trimmed surface towithin a prescribed bound ε > 0. Furthermore, the trimmed surface is identicalto the original surface away from the trim curve and exactly interpolates the trimcurve at its boundary.

Fig. 8. The input to the trimming algorithm is a combined subdivision surface and a trimregion on the surface (left). The trim region is removed and the trim curve is interpolatedat the boundary of the surface (right).

A typical trimming operation begins with the user specifying a region to removefrom a surface (Figure 8). The trim region is bounded by a trim curve that lieson the surface. The representation for the trim curve is a black box which allowsevaluation of the curve for any parameter value u ∈ [0, 1]. Additionally, we requireknowledge of the relationship between the trim curve and the control polyhedronin the form of an approximate pre-image. This pre-image is only used to adapt thecontrol polyhedron to the features of the curve and should not be confused with thecalculation of exact pre-images for NURBS trimming.

There are three main steps to a trimming operation. In the first step, the controlpolyhedron is locally remeshed to accommodate the trim curve. Next, an initialsampling of the input surface is chosen for the control points of the new trimmedsurface through a correspondence. Finally, an approximation stage optimizes thesurface shape near the trim curve.

3.1 Remeshing

Adaptive remeshing of the original control mesh is an important feature of ourtrimming procedure which distinguishes it from classical methods. The remesh-

11

Page 12: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

(a) (b)

(c) (d)

Fig. 9. (a) An initial non-symmetric combined subdivision surface with an approximatepre-image of the trim curve. (b) The triangles in the pre-image are refined as needed to adaptto the curve complexity. (c) Extraneous triangles are removed. (d) The curve is attached tothe mesh. Subsequent relaxation optimizes the control point position and triangle quality.The result is the trimmed combined subdivision surface.

ing algorithm localizes the trimming operation and reduces the size of the controlpolyhedron to the support of the trimmed surface, as follows:

• triangles on the interior of the trim region are removed;• near the trim curve, the control polyhedron is locally adapted to the features of

the curve;• the control polyhedron is unchanged away from the trim curve.

This principle is illustrated in Figure 9. The remeshing algorithm proceeds throughthree stages:

(1) The control polyhedron is locally adapted near the trim curve. The trian-gles which map to the curve under the approximate pre-image (Figure 9a) are

12

Page 13: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

tested against a refinement criterion. A triangle that is identified for refine-ment is subdivided and the pre-image is updated. This continues until all ofthe triangles in the trim curve pre-image require no further refinement (finetriangles in Figure 9b). In our example, we refine a triangle if the length of thecurve segment exceeds its chord length by a prescribed threshold value.

(2) The triangles in the trim region are removed (Figure 9c). Using the up-dated trim curve pre-image from stage 1, the triangles in the trim region areidentified and discarded from the control polyhedron.

(3) The control polyhedron is attached to the trim curve (Figure 9d). A trianglestrip is added along the control polyhedron boundary created in stage 2. Thenew vertices that attach to the trim curve are assigned initial parameter valuesu0

i taken locally from the trim curve. These vertices are then iteratively relaxedto improve the aspect ratios of the new triangles. In the relaxation step, we se-lect the triangle p0

i q0r0 for each boundary vertex p0

i and estimate the parametervalue u0

i for an isosceles triangle, i.e. ((q0 + r0)/2 − c(u0i )) · (q0 − r0) = 0.

We then modify u0i to be (1− δ)u0

i + δu0i for step size δ. The parameter values

typically converge after a few iterations.

The initial control polyhedron for the trimmed mesh is generated by tessellatingthe nested subdivision hierarchy produced in the first stage. This introduces irregu-lar vertices into the trimmed mesh and causes the limit surface to deviate from theoriginal surface, which we control in subsequent stages of the algorithm with detailcoefficients. Only in stage 3 are new vertices inserted which do not correspond tosubdividing the original control mesh. Consequently, the new surface is a reason-able initial approximation of the original surface near the trim curve, and an exactrepresentation away from the trim curve where no refinement occurred.

3.2 Correspondence

Before we can apply the quasi-interpolation stencils given in Section 2.3, we needto identify samples on the original limit surface that correspond to the control pointsof the trimmed mesh. Thus in an intermediate stage between remeshing and approx-imation, we choose an initial sampling of the original surface through a correspon-dence relationship.

There is a natural correspondence for the control points not on the trim curve itself,since they were generated from the subdivision hierarchy of the original controlmesh. However, the connectivity of the control points near the trim curve changesthrough remeshing. Therefore the natural correspondence for the control pointsnear the trim curve is poor, since their limit points are different from the corre-sponding points on the original surface. For these control points, we improve uponthe natural correspondence by choosing new samples on the original surface (seeFigure 10). This is done by performing a limited search on the original surface for

13

Page 14: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

a sample that is closer to the new limit point. By starting at the natural correspon-dence, this search is very effective in establishing the initial sampling of the originalsurface.

Fig. 10. The control mesh for the original surface (left) and the trimmed control mesh(right). The marked control points have their natural correspondence improved.

3.3 Approximation Algorithm

The final stage in the trimming algorithm is to fit the trimmed surface to the orig-inal surface. This operation is only required near the trim curve, where the controlmesh was generated by the remeshing algorithm in Section 3.1. Away from thisregion, the trimmed surface is not affected by the fitting operation and thus remainsidentical to the original surface. Within this region the approximation of the orig-inal surface is generated as a hierarchy of detail coefficients. A local refinementcriterion limits the depth of the hierarchy in areas where the surface satisfies a con-vergence threshold ε > 0.

The approximation algorithm is applied to a set of triangles T 0 whose correspond-ing limit patches overlap the region influenced by the trim curve. Letting N(p)denote the set of triangles incident to a control point p, we initialize T 0 with theunion of N(p0

i ) for each p0i whose connectivity changed through remeshing (see

Figure 11a). The algorithm proceeds as follows:

Approximate(T j)while T j �= ∅:

Modify(T j)T j+1 := Refine(T j)j := j + 1

First the limit surface is modified to approximate the original surface at the current

14

Page 15: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

(a) (b) (c)

Fig. 11. (a) The input set T0 is illustrated by the region shaded light gray, with the modifiedvertices marked. The limit surface corresponding to the dark shaded region matches theoriginal surface exactly and must be preserved. (b) The limit patches that are compared tothe original surface are given by N (T ). (c) The set T1 is produced in the refinement step.

level of the hierarchy. Then the triangle set T j is locally refined to produce a newset of triangles T j+1 at the next level in the hierarchy. If T j = ∅, the limit surfacerequires no further improvement, and the algorithm terminates.

The limit surface is modified locally by only computing detail coefficients for thecontrol points P j on the interior of T j (see Figure 11a). Since the interpolatingstencils are applied after adding the quasi-interpolation detail to the surface, wepartition P j into two sets P j

QI and P jI which are modified separately. P j

QI contains:

(1) all coarsest level control points;(2) all interior control points at finer levels with valence six;(3) all boundary vertices that are not at a corner.

We identify these control points with the predicate QI(pji ). The control points in

P jQI are modified first: the appropriate quasi-interpolation stencil is applied to each

control point to obtain a detail coefficient (computed in detail(pji )), which is added

to the control point after being computed for all of P jQI . This procedure is repeated

for the control points in PI , which become increasingly isolated as the triangle setis refined. T j is refined in subsequent iterations of the approximation algorithm.The modification algorithm follows:

Modify(T j)P j := {pj

i | N(pji ) ∈ T j}

P jQI := {pj

i | pji ∈ P j ∧ QI(pj

i )}∀pj

i ∈ P jQI : dj

i := detail(pji )

∀pji ∈ P j

QI : pji := pj

i + dji

P jI := {pj

i | pji ∈ P j ∧ ¬QI(pj

i )}∀pj

i ∈ P jI : dj

i := detail(pji )

∀pji ∈ P j

I : pji := pj

i + dji

15

Page 16: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

The final step refines elements in T j to produce the input set for the next itera-tion of the approximation algorithm. Triangles in T j are selected for refinementby comparing the approximation to the original surface. We must consider all ofthe limit patches that were modified above (see Figure 11b). A refinement criteriontest(t) assesses the approximation over a single limit patch, and the limit patcheswhich do not adequately approximate the original surface are subdivided. In ourimplementation, test(t) estimates the L∞ error over t by measuring the differencesat its vertices after subdividing once, and chooses to refine t if this estimate exceedsa prescribed threshold ε > 0. The accumulation of these child triangles and theirneighbors produces the triangle set T j+1, where the neighborhood N(T ) of a trian-gle set T is the union of N(p) over all control points p in T . We remove from T j+1

those triangles that are not adjacent to a child of a triangle in T j (see Figure 11c).This guarantees that the surface beyond the influence of the trim curve will notbe modified. The remaining triangles become the input to the next iteration of theapproximation algorithm. The refinement procedure is given below.

Refine(T j)T j+1 := ∅∀t ∈ N(T j) :

if test(t) = falseT j+1 := T j+1 ∪ N(subdivide(t))

∀t ∈ T j+1 :if parent(N(t)) ∩ T j = ∅

T j+1 := T j+1 \ {t}return T j+1

4 Results

We demonstrate the trimming algorithm with a number of examples based on thehubcap design study featured in Figure 1. All computations were performed in sin-gle precision arithmetic. The hubcap was produced by trimming circular bores andstyling detail from a contoured plate 40cm in diameter (see Figure 12). A pseudocolor plot of the error in the trimmed surface is depicted in Figure 13, displayedat successive levels of refinement during the approximation algorithm. The max-imum error was 571µm in the surface produced by the remeshing algorithm (topleft) and 205µm, 47µm, 9.9µm and 2.7µm for levels 0 through 3 respectively. Themaximum error is isolated near the high valence vertices.

Figure 14 illustrates the approximation of the original surface for a circular bore.This example demonstrates the locality and adaptivity of the approximation algo-rithm. The region influenced by the remeshing algorithm is shown on the controlmesh on the top left, and superimposed on the limit surface below. Away from thisregion, the control mesh and limit surface are identical to the plate model. The

16

Page 17: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

Fig. 12. The initial plate model (left) and the trimmed hubcap model (right). The corre-sponding control meshes are shown on the bottom.

517µmL =∞ 205µmL =∞ 47µmL =∞

9.9µmL =∞ 2.7µmL =∞

Fig. 13. Pseudo color images showing the error at successive levels of approximation.Shown top left is the surface generated by the remeshing algorithm, before detail coeffi-cients were computed. The colors were rescaled for each pseudo color plot.

17

Page 18: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

adjacent diagrams illustrate the steps in the approximation algorithm through suc-cessive levels of refinement. By restricting the deviation of trimmed surface fromthe original surface to ε = 13µm, the region for the approximation vanishes afterthree iterations. The L∞ error for a limit patch was estimated by measuring the dif-ferences at the control points for the patch after subdividing once. The maximumerror was 415µm in the surface produced by the remeshing algorithm (far left) and218µm, 29µm and 10µm for levels 0 through 2 respectively.

Fig. 14. Stages in the approximation of the original surface near a circular bore. The re-gion of the control mesh affected by the remeshing algorithm is shown on the far left. Tothe right, the triangles being approximated at successive levels of refinement are shownsuperimposed on the region of influence.

415µmL =∞ 218µmL =∞ 29µmL =∞ 10µmL =∞

Fig. 15. Corresponding pseudo color plots with the region of influence superimposed. Thecolors were rescaled for each pseudo plot. For the final surface on the far right, the colorsare scaled relative to the prescribed tolerance (ε = 13µm).

Finally, we demonstrate the remeshing algorithm by moving the circular bore to-wards the circumference of the plate. As the bore approaches the edge of the plate,the tessellation is made sufficiently fine to separate the boundaries of plate and bore(see Figure 16a). This example demonstrates the robustness of our remeshing pro-cedure near increasingly thin surface sections. In Figure 16b, the bore cuts the edgeof the plate producing corners where they intersect.

5 Conclusions

We presented a novel trimming algorithm for subdivision surfaces based on the useof a combined subdivision scheme. The latter allows us to guarantee exact (transfi-

18

Page 19: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

Fig. 16. The control mesh produced for a circular bore. As the bore approaches the edge ofthe plate, the tessellation between the boundaries becomes finer (left). When the bore cutsthe edge of the plate, corners form at the intersection (right).

nite) interpolation of the desired piecewise smooth trim curve, easily avoiding topo-logical inconsistencies, such as cracks at trim boundaries. In contrast to traditionalpatch trimming approaches we construct a new control mesh whenever the surfaceis trimmed. This implies that the original surface is perturbed in the vicinity of thetrim curve. However, the approximation error can be controlled and we are able toachieve L∞ accuracies on the order of 1 part in 105 in single precision arithmetic(10µm for a 1m model). This is achieved through the use of quasi-interpolationoperators together with multiresolution detail coefficients.

Possible future work directions include

• Quasi-interpolation: The approximation properties of our quasi-interpolationoperators are as yet poorly understood and more work is needed to fill this gapas well as design better operators.

• Surface-surface intersection: Since our trimming procedure only requires anevaluation procedure but no explicit representation of the trim curve it would beinteresting to consider it as the basis for CSG operations on subdivision surfaces.

6 Acknowledgements

This work has been supported in part by NSF (DMS-9874082, DMS-9872890,ACI-9982273), Alias|Wavefront, Microsoft, Intel, Lucent, and the Packard Founda-tion. We would like to thank the anonymous reviewers for their helpful comments.Special thanks to Khrysaundt Koenig for modeling, lighting, and texturing.

19

Page 20: Trimming for Subdivision Surfacesmultires.caltech.edu/pubs/trimming.pdf · accurately describing trimmed surfaces, we present a new subdivision surface rep-resentation. We use a combined

References

[1] T. DeRose, M. Kass, T. Truong, Subdivision surfaces in character animation,Proceedings of SIGGRAPH 98 (1998) 85–94.

[2] S. Krishnan, D. Manocha, An efficient surface intersection algorithm based on lower-dimensional formulation, ACM Transactions on Graphics 16 (1) (1997) 74–106.

[3] J. Keyser, S. Krishnan, D. Manocha, Efficient and accurate b-rep generation of lowdegree sculptured solids using exact arithmetic: I – representations, Computer AidedGeometric Design 16 (9) (1999) 841–859.

[4] J. Keyser, S. Krishnan, D. Manocha, Efficient and accurate b-rep generation of lowdegree sculptured solids using exact arithmetic: II – computation, Computer AidedGeometric Design 16 (9) (1999) 861–882.

[5] A. Levin, Combined subdivision schemes for the design of surfaces satisfyingboundary conditions, Computer Aided Geometric Design 16 (5).

[6] A. Levin, Interpolating nets of curves by smooth subdivision surfaces, Proceedings ofSIGGRAPH 99 (1999) 57–64.

[7] H. Hoppe, T. DeRose, T. Duchamp, M. Halstead, H. Jin, J. McDonald, J. Schweitzer,W. Stuetzle, Piecewise smooth surface reconstruction, Proceedings of SIGGRAPH 94(1994) 295–302.

[8] J. E. Schweitzer, Analysis and application of subdivision surfaces, Ph.D. thesis,University of Washington (1996).

[9] H. Biermann, A. Levin, D. Zorin, Smooth subdivision surfaces with normal control,Proceedings of SIGGRAPH 2000 .

[10] C. Loop, Smooth subdivision surfaces based on triangles, Master’s thesis, Universityof Utah, Department of Mathematics (1987).

[11] M. Halstead, M. Kass, T. DeRose, Efficient, fair interpolation using catmull-clarksurfaces, Proceedings of SIGGRAPH 93 (1993) 35–44.

20