Construction of Fair Surfaces over Irregular Meshes

4 downloads 278332 Views 1MB Size Report
polygonal holes in the surface or mesh with proper edge joint, since the irregularity ... where u, v 6 [0, 1], and Bi,k are degree k Bernstein polynomials and the bij ...
Construction of Fair Surfaces over Irregular Meshes G e i r Westgaard* SimSurgery AS

Horst Nowacki t TU-Berlin

Figure 1: The Ville de Mercure surface model (after fairing).

Abstract

to measure surface characteristics related to curvature, variation of curvature, and higher order surface derivatives based on integral functionals of quadratic form derived from the second, third and higher order parametric derivatives of the surface. The choice is based on the desired shape character. The construction of the surface begins with a midpoint refinement decomposition of the irregular mesh into aggregates of patch complexes in which the only remaining type of building block is the quadrilateral B6zier patch of degrees 4 by 4. The fairing process may be applied regionally or to the entire surface. The fair surface is built up either in a single global step or iteratively in a three stage local process, successively accounting for vertex, edge curve and patch interior continuity and fairness requirements. This surface fairing process will be illustrated by two main examples, a benchmark test performed on a topological cube, resulting in many varieties of fair shapes for a closed body, and a practical application to a ship hull surface for a modern container ship, which is subdivided into several local fairing regions with suitable transition pieces. The examples will demonstrate the capability of the fairing approach of contending with irregular mesh topologies, dealing with multiple regions, applying global and local fairing processes and will illustrate the influence of the choice of criteria upon the character of the resulting shapes.

This paper describes the process of constructing a fair, open or closed C 1 surface over a given irregular curve mesh. The input to the surface construction consists of point and/or curve data which are individually marked to be interpolated or approximated and are arranged according to an arbitrary irregular curve mesh topology. The surface constructed from these data will minimize flexibly chosen fairness criteria. The set of available fairness criteria is able *SimSurgery/lntervensjonssenteret University of Oslo, Stenergt. IE, 0050 Oslo, Norway, [email protected] tTechnische Universit~it Berlin, Inst. fiir Sehiffs- und Meerestechnik, Sekr. SG 10, Salzufer 17-19, 10587 Berlin, Germany, [email protected] Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Solid Modeling 01 Ann Arbor Michigan USA Copyright ACM 2001 1-58113-366-9/01/06...$5.00

Keywords: Irregular mesh interpolation and approximation, Surface fairing, Variational fairness criteria, Higher order fairness mea-

88

sure, Local and global fairing, Biquartic B6zier patch complex

1

• Criteria of quadratic form of any order and with any directional orientation (Kallay and Ravani [15]).

Introduction

Construction of variational criteria using standard norms and operators, building on geometric invariants (see Greiner's survey paper [9]).

Many surface constructions proceed in consecutive steps from given point and individual curve data via curve mesh topologies which are to be interpolated and/or approximated to a resulting surface. To ensure the geometric quality of this surface at the final stage of this process it is of great advantage to offer a construction that fairs a surface automatically over a given, generally irregular mesh, minimizing a variational surface fairness measure and ensuring at least tangent plane (C 1) continuity. The mesh curves and mesh knots can be individually designated to be interpolated or approximated. Moreover it is often desired to subdivide the surface into several regions in order to apply different fairing processes and criteria in each region, and still to maintain C I connections across all regional boundaries. The current paper describes methods and algorithms for such a surface fairing process over irregular meshes. This work is motivated by applications in the aircraft, automotive, shipbuilding and several other industries. In these applications curve meshes may result from lines drawings in orthogonal views or from digitizing curve data off mockup models. A high premium is placed both on faithful reproduction of the given mesh curves and knots and on attractive fairness qualities of the resulting surface. Compromises between these two requirements are a necessary ingredient in a good solution. However we do not regard such a compromise as subjective decision, rather we claim that the designer can and always should state the desired shape characteristics in terms of explicit, quantifiable fairness criteria and constraints. Experience with surface fairness measures in CAD systems is still very limited, though at least one systematic benchmark test has been reported in [1]. This paper will help to lay some foundations for systematically collecting such surface fairing experiences. In the present context we use the word ,fairness' of curves and surfaces for the property of minimizing some explicit, given fairness criterion as distinct from ,smoothness', which requires at least tangent plane continuity throughout the surface. We desire our surfaces to be smooth and fair. In the history of CAD systems curve fairing methods far preceded surface fairing techniques, in part also because many industries prior to compt~ter application would only fair curves, but not surfaces. In our experience a good, prefaired curve mesh is still a necessary prerequisite for achieving high quality of surface fairness, but generally not a sufficient condition (Nowacki et al. [21]). Fairness also depends on suitably shaping the interior geometry of the mesh cells. The earlier surface fairing methods were aimed at minimizing fairness criteria in analogy to curves, which were based on the ,strain energy of bending in a thin elastic plate' (Walter [24], Nowacki/Reese [20], Hagen/Schulze [10]). This energy is related to the total curvature in a surface so that it can be approximated by geometric, curvature related properties. Even quite recently energy functionals were used directly in a variational surface fairing method (Bercovier et al. [3]). This class of second order criteria has been criticized for tending to overly flatten curved regions and for responding too undiscemingly to the sum of the principal curvatures in undesired, coupled ways (Jin [14]). In recent years many extensions of the classical surface fairness measures were proposed and explored in order to provide more deliberate choices to suit different orientations in the applications. Significant trends today are toward:

• Promising exploratory work on third order geometric invariants by Gravesen and Ungstrup [6]. In the present paper many of these new ideas will be picked up and a variety of fairness measures will be defined which range from first to fourth order, generally favouring quadratic forms and allowing for directional bias (Section 3). The other key requirement in our surface fairing approach is contending with irregular mesh topologies. The interpolation or approximation of irregular curve meshes in the past has been approached essentially in three distinct ways (Farin [5], Hoschek/Lasser [12]), all designed to deal with filling n-sided polygonal holes in the surface or mesh with proper edge joint, since the irregularity of the mesh can be ascribed to arbitrary n-sided mesh cells. The three main approaches are: Direct representation of n-sided patches by transfinite interpolants (Gregory [7], Charrot/Gregory [4], Gregory/Hahn [8]). • Decomposition of n-sided elements into triangles (see Farin [5], Hoschek/Lasser [12]). Decomposition of n-sided elements into four-sided elements (Sarraga [23], Hahn [11], and more recently Ye [27, 28], Peters [22]). In this paper, which is based on the methodology developed by Westgaard [25], we adopt the last-mentioned approach because it results in a uniform data type for surface representation, namely in quadrilateral, biquartic B6zier elements throughout the surface, which is a standard data type in CAD systems and in data exchange. The method of midpoint refinement is used to convert the irregular mesh into complexes of four-sided B6zier patches. The foundations for unique, continuous and compatible constructions of midpoint refinement mesh structures for surface generation were laid by Ye [26] and Peters [22]. Other solutions for irregular mesh interpolation, but not fairing, in application to ship surfaces were developed by Michelsen [19] and Koelman [16]. Experience has also shown that many practical surfaces possess several regions of characteristically distinct shape character, like the bow, the midbody and the stern of a ship, and thus should not be faired jointly in order not to lose the desired local features. Therefore we allow the surface to be subdivided into several independent regions connected with C 1 joint.

2

Overview

The following problem is posed for surface fairing over irregular meshes. Consider a surface ,S, open or closed and of any desired genus, which is subdivided into regions Rj. The regions after decomposition of irregular mesh cells, as explained in detail in Section 4, will consist solely of complexes of contiguous, quadrilateral B6zier patches, parameterized locally by (Si, Ui). Thus the surface ($ = {(Si, UI)}) is built up as:

• Third and higher order measures of fairness to control the variation of curvature etc. [21]. • Anisotropic fairness criteria for direction depending fairing tasks [14].

s

=

Us,(u,), i

89

3

and the individual B~zier patch (Si, U i ) is represented in the form kl

S (u, v) = Z i=O

The fairness of a surface can be described in terms of the distribution of its second and higher order derivatives, preferably expressed as geometrically invariant surface properties. This can be done at the levels of curvature, variation of curvature and variation of variation (VV) of curvature. Thus the following descriptors are relevant locally in forming fairness measures: Second order:

k2

Z

b,j Bi,k, (u)Bj,k~ (v),

(1)

j=O

where u, v 6 [0, 1], and Bi,k are degree k Bernstein polynomials and the bij are a rectangular array of B~zier control points. We have chosen biquartic patches (kx = k2 = 4) because the degree 4 is necessary and sufficient for meeting the patch boundary interpolation constraints while still allowing some free control points in the patch interior to retain some freedom for surface fairing. Higher polynomial degrees would have been feasible within the same approach to achieve even more fairing freedom, though at the expense of increased computing time. The method was developed in a B6zier setting because the local patch control, especially in an irregular mesh, can best be realized with local, uniform data type elements, hence Bfizier curves and patches of standard degree. However conversions from and into Bspline representation without loss of information are readily available (Farin [5], Hoschek/Lasser [12]). Thus a given B-spline curve mesh can be transformed into a set of B6zier patches by repeated control point insertion and vice versa by merging B~zier segments into B-spline combined curves and surfaces. However the B-spline surface representation is limited to regular mesh regions. Thus the full benefit of irregular mesh fairing will require irregular mesh structures and corresponding data types, hence more than a single B-spline surface. An irregular curve mesh is initially given, composed of individual curves c~ (t) and mesh knots rnr in a given topology (connectivity of curves and knots).The resulting faired surface must meet the following requirements:

=

a weighting factor

D

=

some deviation measure.

T2

=

k2 + k2

principal curvature Gaussian curvature mean curvature absolute curvature principal curvature norm,

Ikll + Ikzl

Kz 1-13

= =

[Igrad, K2l[, Ilgrad~H21[,

A3 Tz

= =

Jlgrad, Azlls Ilgrad, T2}l~

variation of Gaussian curvature variation of mean curvature variation of absolute' curvature variation of principal curvature norm,

Fourth order: VV of Gaussian curvature VV of mean curvature

A4

=

&sA2

VV of absolute curvature VV of principal curvature norm,

(4)

where grads and A , are the gradient and Laplacian operator on the surface ,S, and [I • IIs the norm on S. Fairness measures over a surface region U are formed by integrating the square of the above descriptors, generically abbreviated by F: JF,(S)

f f Fdws= min,

=

(5)

where -

* If an initial surface S O prior to fairing is also given in addition to the curve mesh, then the integrated deviation D between faired and given surface may be included in the objective function M by postulating (Westgaard[25]):

w

kl • k2 (kl + k2)/2

(3)

• The surface minimizes a fairness measure J, assigned globally or regionally. The possible types of fairness measures are described in Section 3.

J+wD=

= = --=

Third order:

• It will be tangent plane continuous (C 1) everywhere. The curves arriving at a mesh knot share the same tangent plane.

---

kl, k2 K2 H2 A2

(2)

• It will interpolate or approximate the given mesh curves and knots, as individually specified.

M

Fairness Criteria

dws

=

the surface element

F

=

the descriptor

JFi(S)

=

the fairness measure for descriptor F and order i.

E.g., the well-known integral functional of Gaussian curvature is this special case:

min,

JK2(S)

This problem formulation is an optimization problem of Nonlinear Programming type. We generally choose quadratic form functionals for J, and potentially D, and model the C 1 condition as a linear equality constraint on the relevant free control points. In this case a Quadratic Programming problem arises, which resulks in a linear equation system with positive definite matrices (Westgaard[25]). This system can readily be solved numerically. We refrain from using methods based on physical fairness criteria, because of added complexity and uncertain benefits. Fairing is performed region by region with suitable boundary joint constraints, in each region either globally in a single simultaneous step or locally for a subset of the regional patch complex in an iterative process, as will be explained in Section 4.

=

f / K2d~s.

(6)

This group of functionals forms a class of geometrically invariant fairness measures to be minimized. Other choices are discussed by Greiner[9] and Westgaard[25]. The drawback of most invariant measures is that they are tedious to evaluate and to optimize because of their nonlinear dependence on the free control points. This is why approximations are often taken where the functionals become parameterization dependent, but are of quadratic form. Such approximations are acceptable provided that the parameterizations are sufficiently arc length preserving. In practice we have adopted parameterization dependent measures of quadratic form as objective functions in fairing, but we have also calculated the invariant set to monitor the parameterization bias.

90

4 Mesh Decomposition and Composite Patch Fairing

In this spirit we have adopted a set of integral functionals as fairness criteria, in which the partial derivatives of the surface with respect to the parameters u and v play a part. We use either an expression derived from the complete Frobenius norm of some order (Greiner[9]), where these measures are marked with subscript F in the list below, or we select and emphasize only certain directional derivatives for direction oriented higher order fairing criteria (similar to Jin[14]). In all cases the functionals yield quadratic forms in terms of the free control points• The following parameterization dependent fairness measures were used and are relevant in the context of the examples in this paper:

J2(S)

=

J~(S)

=

ffs~duav f£SLdudv

3:.s) = f £ Z~(S)

Input data mesh points Mp,~t8 = { m i } and/or mesh curves M . . . . = {ci (ti)}, have to be organized in a uniform way. A good strategy for dealing with an irregular mesh structure is to use midpoint refinement (see Ye (1994), Peters (1995)), inserting additional points at the centroid of each mesh cell and the midpoint of each cell curve, as shown in Fig. 2 (b). The refined mesh structure then consists only of quadrilateral subcells and two types of mesh points: m4siae that correspond to edge midpoints (4-sided), mnside that correspond to original mesh points and centroids (nsided) of mesh cells• These star points in n-sided mesh cells are initialized as corner points averages (centroids), but will later be free to adjust themselves to optimal position according to fairness criteria and process• After decomposition of the irregular mesh into a composite complex of biquartic Belier patches the data structure of the composite surface is organized in a uniform way.

+ S:vv)dudv S ~ + 2 S ~ + S,~.dudv

=

input data

In

J (s) -- f £

J:(s)

+

=

fLs j ,dv

=

S....

+

+ midpoint refinement

+ 4S~,~,v + 6S~uvv +

2

2

4S . . . . + S . . . . dudv.

(7) rnl t

Deviation measures should be applied when a tentative surface shape is known and the resulting faired surface shall not deviate too far from it. We use parameterization dependent deviation measures D defined by global or regional integrals, applied to error square terms, comparing between an existing shape S (u, v) and the faired shaped S(u, v):

D O(S, S)

f

D ~ ( S , S)

//u(~

....

6(s- . . . .

- S~)

dudv

-s ....

)%4(~ .... 2

-s .... )+4(s 2

(S . . . . - S . . . . ) dudv.

-

....

{

b

~

4

Figure 2: Input: Given mesh points Mp,~ts = { m l , - . . , m s } and mesh curves M e , v s = { e l , . . - , es} (a), put into a consistent midpoint refinement structure (b). In the fairing process our goal is to construct a fair C 1 multiple patch composite surface over a given mesh of irregular topology. The given data at mesh vertices Mp,~t8 and/or at mesh curves Mc~w are to be interpolated or approximated, and a fairness measures is to be minimized, that is, we want to solve the problem: Minimize a fairness measure and a weighted deviation measure J ( S ) + w D ( S , S ) over a chosen surface region ,9, where w is a scalar weighting factor subject to

l u (~ - S)2dudv

D~ (~, S)

3

- s ~,,~v) +2 2

-s .... )+

1. Interpolation or approximation conditions for the given mesh point and/or curve data (Mpnts, Mcrvs) and

(8)

91

2. C 1 joint connection conditions across boundaries between adjacent patches.

corresponding B6zier control points. If a mesh point m~ is to be interpolated, it will simply be fixed, i.e., the corresponding design variable d = r n l is no longer free. Similarly in order to interpolate given mesh curves, all of their control points are fixed. To approximate a mesh point, say rnl, it is associated with the control point, say d l , we minimize the square of the distance between m l and d l , that is:

The B6zier control points of the composite surface are the free and/or fixed design variables. Some are given as input and hence permanently fixed, and some others are fixed to satisfy interpolation conditions. The fixed control points are passive control points (boundary conditions), and the remaining control points are free variables (denoted d) to form the optimal shape. Our fairness measures, deviation measure and approximation conditions are of quadratic form, and the C 1 conditions are linear constraints, so that we will obtain an optimization problem of quadratic programming type, as we shall demonstrate. It leads to Lagrange necessary conditions as a linear system of equations (Westgaard [25]). Fairness Measure and Deviation measure For a composite surface $ -----{(Si, U i ) } the fairness measure for the whole region is given by:

minimize

where wl is the weighting factor given for the mesh point m l . In order to approximate a given mesh curve c~ with control points (!~o,..., b4) by a faired mesh curve Cappwith control points ( d / , . . . , dl+4), we postulate that the square of the distance between old and new control points be minimized: 4

minimize

=

Z J(Si),

(16)

where w, is a weighting factor for curve e~. The functional is again of quadratic form so that its minimization yields 'the linear system:

Qappdapp = qapp,

J ~ (Si) JaF (Si)

for curvature minimization for variation of curvature minimization

J~,(Si) + a J ~ (Si)

for a compromise (a a positive weight).

where

These functionals are of quadratic form (Westgaard [25]) in the components of d, so that the condition min.

J(S)

w.r.t, d = { d i } ,

=q j,

= matrix of coefficients from all curve

dapp

approximation conditions -- vector of free control points in edge curve approximation

qapp

= righthand side of curve approximation conditions.

(11)

Qj

= matrix of coefficients from J ( S )

dj qa

= vector of free control points = righthand side of fairness conditions from

(17)

Qapp

(10)

yields linear equations in the matrix form

where

~_w,.. IIdL+~ - b~ll 2,

(9)

where in accordance with (7) any type of parameterization dependent measure may be chosen as objective function, e.g.:

Qjdd

(15)

i=0

J(S)

or

wx. lid1 - ml[I 2,

d(S).

C 1 joint condition The condition for two surface patches Si and Si+l to be G 1 continuous across their common boundary curve c(t) = Si(0, t) = S i + l ( t , 0),t E [0, 1] is that there exist scalar functions p(t) and q(t) such that (Hoschek/Lasser [12], Ye [26]) the first order cross boundary derivatives are related by:

p(t).D1Si(O,t)=q(t).O2Si(O,t)+D2Si+l(t,O),

rE[o, 1], (18)

The deviation D of a given composite surface ~ = {(Si, U i ) } and of the faired composite surface S = {(Si, U i ) } is defined in the same way as for regional fairness measures: D(,S,S)

=

~D(Si,Si),

where D1 and D2 denote derivatives in the direction along c(t) and transversely to e(t), respectively. It is well known that the 'weighting factor' functions p(t) and q(t), which are related to the coordinate transformations between parameterizations in adjoining patches (Ye [26]), cannot be arbitrarily chosen. The twist vectors of the surface patches must be made compatible around the mesh points. Barnhill [2] gives good examples, e.g., for the zero twist vector case, which is often used in initializing Coons surfaces. In our construction we include the twist vector compatibility directly in the C 1 joint condition. If Si and Si+l join G 1 continuously along c(t) and if the reparameterization along c(t) is the identity, then S~ and Si+l also join C I. In the present context we have chosen a specific construction to achieve C 1 joint between adjacent patches, which Peters [22] has defined over a midpoint refinement structure. The C 1 joint between Si and Si+l along their common edge e(t) is based on the following construction:

(12)

i

and consist of functionals of quadratic form (Westgaard [25]). The condition rain.

D(,.q,S)

w.r.t, d = { d i } ,

(13)

yields linear equations in the matrix form QDdD where

Qo do qD

= qo,

(14)

= matrix of coefficients from D ( S , S) = vector of free control points = righthand side of deviation conditions

2c(1

-

t)xDlSi

=

O2Sl +

D2SI+I,

c =

cos(27r/n),

(19)

where n is the number of patches surrounding the mesh point of type Mnside. We proceed to use the construction (19) in order to ensure C 1 joint between patches Si and Si+l. To achieve this we must force

from D(,5, S). Mesh Point and Curve Interpolation/Approximation Interpolation of mesh points and mesh curves are handled by fixing

92

the quartic B6zier patch edge curve to be cubic. This approximation is feasible provided that the middle control point of the quartic curve, b02,i, is approximated and replaced by (Farin [5]): bo2,i

with A = A c l , a = a m , L = (A1,... ,Am) = Lagrange multiplier, vector for m constraints and d = free variables. The system (24) has an unique solution if and only if Q is positive definite and A has full rank (Luenberger [18]), which gives us a unique solution since Q is positive definite and A has full rank in our construction.

1 4 1 4b 1b ~ ( ~ b m , i - ~boo,i-{- ~ o3,i - ~ 045). (20)

=

Local,iterativefairing

A drawback of the global approach can be the size of the equation system (24), and that local inputs influence the whole surface shape.To exert some more local, selective fairing control an iterative, stepwise fairing approach has been developed, which is based on the same types of conditions as in (23), but applies only local subsets thereof in successive passes. The local fairing process encompasses three independent passes. In each pass some suitable subset of the B6zier control points is constructed. We will use Figure 3 to illustrate the sequence of three passes. Fig. 3 shows an irregular suitably refined mesh structure and illustrates the sequence of three passes. In each pass some control points are fixed (symbol I-q), e.g. by interpolation conditions, and others are free and will be computed in this pass (symbol ,). Free control points in the earlier pass are then fixed (boundary conditions) in the succeeding passes. The surface is built up by successively meeting three types of local conditions" (1)Tangent plane continuity at each mesh knot, (2) C 1 joint across each edge, (3) optimal fairness in the mesh cell interior. Each pass is organised as a fairing problem of type (23) but involving only a small set of patches relevant to the local problem.

D l S i then becomes a quadratic polynomial function while D2Si and D2Si+1 are of degree 4. Equating the five coefficients of the quartic polynomials on either side of (19) yields the following five linearly independent relations between the control points of Si (bkl,i) and Si+1 (bkt,i+l): 2c(bm,i-boo,i) c(4bo3,i-bo4,i-4bm,i+boo,i)

= =

blo,i+bm,i+l-2boo,i

4(bll,i+bll,i+l-2bol,i)

2c(bo4,i-bo3,i) = 0 =

6(b12,i+b~l,i+l-2bo2,1) 4(b13,i+b31,i+l-2boa,i)

0 =

b14,i+b41,i+l-2bo4,i, (21)

where boj,i = bj0,i+l. The six control point relations in (20)(21) are linearly independent (Westgaard [25]) and establish a connection between control points in the first rows adjoining to the edge curve on either side. In the literature one will find other control point relations to ensure 6`1/G1 joint (Liu/Hoschek [17]). If a 6`1/G1 joint condition is linearly independent it can be used in our general fairing approach. Collecting all 6`1 joint conditions of type (20), (21) for all interior mesh curves results in a set of linear constraints of the form: Acldcl where

= acl,

nlnside

inpUtmsc~data c2 e3

(22)

At1

= matrix of coefficients in C 1 constraints

de1

= vector of free control points in C 1

at1

constraints = righthand side of 6 '1 constraints.

(a)

GlobalSimultaneousFairing In the case of global fairing we apply all conditions to the entire fairing region simultaneously: Fairness condition: Deviation condition: Point and curve approximation: C I joint condition:

Q j d j = qJ Q D d D = QD Qappdapp = Qapp Acldcl = Acl.

m4side

~""--J~ ma

m2

pass 2

(b)

m,,~iz~

pass 3

(23)

The three first conditions of (23) can be combined as quadratic form minimization conditions by merging matrices and vectors, using the Boolean sum operator @, Q

=

QJ~QD(~Qapp

q

=

qJ @ qD @ q'~np,

Figure 3: Illustration of control points involved in each of the three fairing passes: (a) input data (app = approximation is allowed), (b) pass 1, (c) pass 2, (d) pass 3.

while the fourth condition of (23) is a linear equality constraint. The quadratic program for (23) can thus be expressed as: minimize

1 T ~d Qd + qTd

subject to

A d = a.

Pass 1 deals with the tangent plane continuity condition at each mesh knot and established the surrounding control points, by solving local a fairing problem involving only the patches immediately surrounding the mesh knot. Initially these surrounding patches are defined by mesh knots, midedge knots and centroids from the midpoint refinement structure. Pass 1 determines an optimal tangent plane orientation from this local scenario. The tangent plane orientation is optimal with respect to the chosen fairness measure, when solving the fairing problem of type (23). The control points of these surrounding patches related to mesh cell centroids and m4side mesh points (see Fig. 3) are fixed to avoid the trivial solution O.

The solution or the Lagrange necessary conditions for this problem are:

o

[q]a 93

Pass 2 ensures C 1 joint across each edge and determines the rows of control points neighboring to the edge by locally fairing the adjacent patches. Again to avoid the the trivial solution 0, the control points of patches surrounding the edge related to mesh cell centroids are fixed. Pass 3 keeps the previously found control points fixed and solves for the free control points in the interior of each mesh cell by minimizing the chosen fairness measure locally. This include the free star points Ccentroids") of n-sided mesh cells. The result of this process depends on its initialization. The whole cycle should therefore be iterated until a stable and acceptable shape is reached. The result will usually differ from the shape obtained by global optimization.

also comprises fully irregular meshes, they are characteristic of important applications. More examples can be founded in Westgaard [25].

Topological cube shapes To demonstrate the effect and usefulness of the J ~ , J,~ and 3.4 functionals in a fairing context, we have chosen to construct fair C t surfaces over a simple mesh box structure (Figure 4 (a)), with few constraints and a dominating fairing term. We hold the box vertices fixed for interpolation, thus the control points connected to the box vertices are then fixed design variables and the rest are free design variables to be determined by fairing. The construction of fair C t surfaces from the irregular mesh box structure allows different fair shapes. Do we want a closed box surface with smooth C 1 edges, a sphere-like surface or something in between? The mesh cells being convex suggest a convex surface. In Figure 4 - 5 we demonstrate the use of different fairness measures in the construction of fair C t surfaces using our local fairing method. As we can see in Figure 4 the fair surfaces constructed by minimizing the basic fairness measures J ~ , J,~ and j 4 give different fair shapes. The surface constructed by minimizing the second order fairness measure J ~ tend to be too close to the mesh cells (the skeleton), making the box vertices (skeleton points) too visible (Figure 4 (b)). Analysis of the Gaussian curvature (K) shows that the surface is convex ( K > 0) around the box vertices, but non-convex ( K < 0) round the middle of each edge, which is not desirable. Other examples have also shown that minimizing J ~ tends to give surfaces where the mesh points (or skeleton points) are too visible. Minimizing the basic third order fairness measure J F3 gives a convex, close to box surface with smooth C'1 edges (Figure 4 (c)). To model more spherical kind of surfaces minimizing the basic fourth order fairness measure j 4 is the right choice in this case, as shown in Figure 4 (d), giving a convex sphere-like surface. In Figure 5 we demonstrate fairing by combining fairness measures of different orders, all giving fair convex surfaces. To show that our fair C 1 surface constructions give smooth surfaces, we display the curvature and variation of curvature distribution as offsets in the normal direction for the surface given by minimizing J ~ + J ~ , see analysis plots in Figure 6. From these plots we can see that the surface patches are tangent connected, since the normals of adjacent patches are the same. Notice also that curvature and variation of curvature offset grids are continuously connected over the patch boundaries indicating not only tangent contact, but also curvature and variation of curvature contact. In general this is not achieved, since we only can guarantee tangent continuity. Notice also the highest curvature and variation of curvature values tend to be around the mesh points and mesh edges, that is, in regions where we have constraints. As we have shown in Figures 4 - 5 different fairness measures can be used to construct different types of fair shapes depending on the desired shape. In engineering applications concerned with fair complex surface design, our method can be used to construct fair surfaces defined over irregular meshes. The choice of fairness measure is important as we have demonstrated. The J ~ functional tends to give too close to mesh surfaces, while the combination wl • J ~ + w2 • J ~ tends to give overall good fair shapes where the mesh is "invisible". The local fairing process has proven to give fair surfaces with respect to gentle distribution of curvature and variation of curvature. Ship hull surface The container ship ,Ville de Mercure', a wide, slender hull form with a bulbous bow, was chosen as an example because this case illustrates the results of the fairing process over multiple regions with numerous hard, interpolatory and approximative constraints. The shape is well documented and has also served for hydrodynamic investigations as the well-known Hamburg Test Case [13]. It demonstrates the advantages of fairing for shape quality even when

Combining regular and irregular regions The above process will generate C '1 composite patch surfaces composed of quadrilateral B~zier patches. However, in many engineering applications large regions of regular patch topology arise, e.g., bi-cubic B-spline surfaces with built-in C '2 smoothness in the interior. But regular meshes are limited to surface topologies that are mappable onto the rectangular plane or perhaps a torus without singularities. In practice many exceptions from this simple topology are encountered. Many modelling and design systems are using patch trimming and certain singular parameterizations in the construction of complex surfaces to overcome this problem. However, by destroying the consistent B-spline framework, these techniques create a number of special cases and difficult problems such as desingularization and the need for smoothly joining trimmed surfaces. It is therefore of interest to connect single B-spline surfaces of regular topology by fair transition surfaces of irregular topology. Experience has also shown that many practical surfaces possess several regions of characteristically distinct shape character, like the bow, the midbody and the stern of a ship, and thus should not be faired jointly in order not to lose the desired local features. Therefore it is of interest to subdivide the surface into several independent regions connected with C 1 joint, as we will demonstrate in the next section. The basic condition in combining regular areas (B-spline surfaces) using fair transition surfaces defined over irregular meshes is to use the B-spline surfaces boundary tangent plane data as interpolation constraints for the transition surface strip. These interpolation constraints can be found by knot insertion and degree raising (Westgaard [25]), and have to match the C ~ composite patch surface construction presented in this paper. In this case the irregular meshes between the B-spline surfaces are constructed so that they will connect to the knots in the boundary curve knot vector. Additional mesh points in the interior of the transition strip may also be included to get even more free design variables. The irregular patch topology is defined from the mesh using midpoint refinement, so that we have the necessary freedoms for fairing and interpolation of boundary tangent plane data.

5 Examples Two examples were chosen to demonstrate the results of the fairing process, a topological cube and a modern container ship "Ville de Mercure". The cube mesh is irregular in topology since the three edges emanating from one vertex cannot uniquely be assigned roles of u and v parameters. The container ship has large regular mesh regions (midbody etc.) and a few necessarily irregular regions (e.g. umbilical points at the bulbous bow). Besides the transition strips between distinct regions usually require irregular meshes. This hybrid case of regular mixed with irregular mesh domains is rather frequent in the applications. The general strategy we favor in mesh generation favors minimizing the occurrence of irregular mesh regions in order to reduce complexity. Thus although the examples are not representative of the full capability of the approach, which

94

Faired surface J~ -4 rain

Mesh box structure

Gaussian Kz

Faired surface j 4 _.+ rain

Faired surface J~ -4 rain

Principal curvature norm 7'2

(

(c)

Figure 4: Local fair C'1 surface constructions over an irregular mesh box structure (a) by minimizing different fairness measures (b) (d).

Variation of Gaussian/(3

Variation of principal curvature norm T3

(d

Figure 6: Analysis of curvature and variation of curvature distribution given as offsets in the normal direction (a) - (d), for the fair surface given by minimizing J ~ + J ~ over the mesh box structure, see surface given in Figure 5 (a).

Faired surface J~ + J~ ~ rain Faired surface J~ + d~ ~ rain

Faired surface J~ + J~ --~ rain Faired sl

,

Figure 5: Local fair C 1 surface constructions over an irregular mesh box structure by minimizing different fairness measures (a) - (d). Analysis of surface (a) is given in Figure 6.

95

the densely given data leave little room for much deviation. The objective is to fair the ship hull surface, which was predefined by approximately 9300 offset data points, measured along numerous, more than 100 densely spaced ship sections (Figure 7). The process of surface construction follows the methods described in Section 4 and consists of the following steps: 1. The hull surface is subdivided into several regions whose shape character (curvature distributions and topologies) differ distinctly. They are: Midbody, bulbous bow with umbilical point at the nose, transom stern with wide, flat shape, stern bulb in way of propeller inflow (Figure 9). 2. In each region the boundary curves are faired first, such that the given section end points (at side of deck and at keel) are interpolated while the section data points (at the forward and aft boundaries) are approximated. The curve fairing techniques are described in [25]. 3. The interior section curves in each region are also faired individually with interpolation constraints for the boundary curves. All section curves are given the same knot vector and hence parameter space. Uniform knot spacing is used here for simplicity [25]. Constraints on section flare angles (tangents) at both ends can also be imposed. 4. A fair surface is constructed that interpolates the boundary curves and approximates the section curves within specified tolerances. The boundary representation becomes part of the surface representation and thus governs the knot vectors and parameterization of the surface. In the example we minimize the fairness measure J ~ combined with a weighted offset deviation aggregate. For the midbody (Figure 9, top left) we have used 90 sections by 29 section grid points. For details, see Westgaard [25]. 5. The re~ions are connected by irregular topology transition strips with C' joints on both sides (Figure 8). As one can see in Fig-

~

.,.S!~;~~ .. . . . .

Figure 7: The Ville de Mercure container ship offset data. In total there are approximately 9300 points, measured along ship sections.

ure 8 most of the mesh points are regular, but there exist mesh points where more then four patches meet, hence the transition strips have an irregular topology. Since the boundary curves of the regions originate independently, they may differ in knot vectors and parameterization where two regions meet. This difference is taken into account by generating in general an irregular mesh inside the transition strips with enough interior mesh points to reconcile the different knot vector structure in the boundary curves (Figure 8). A similar irregular mesh type is used for the surface region surrounding the umbilical point at the tip of the bulbous bow (Figure 8). Details on generating these irregular meshes and fairing over them are found in [25]. This stepwise procedure illustrates how in this case large regions with regular meshes and a few local transition regions with necessarily irregular meshes can be combined in a multiple region fairing approach and merged into a single C 1 surface (Figure 1). In this study where numerous tight constraints and densely spaced data are given the overall fairness measure J ~ does not improve much during the fairing process, the result thus depends much on the quality of the given data. But the approach still ensures the avoidance of major flaws and the best possible compromise among somewhat noisy input data. Alternatively, if the input data were noisier or less prefaired, one would tend to use a mesh with much fewer given curves and thus create more freedom for the fairing process.

6

J

~



-

i

/

Conclusions

This paper describes an approach to surface fairing over irregular meshes, interpolating and/or approximating given mesh curves and mesh knots arranged in an irregular topology. The fairness criteria are variational measures of quadratic form based on second and higher order partial derivatives of the surface. The methodology on which the entire approach is based reduces the irregular mesh structure by midpoint refinement of n-sided mesh cells into aggregates of only quadrilateral, quartic B6zier patches. These patches comply with C 1 smoothness and compatibility conditions and have free interior control points whose position is optimized with regard to surface fairness. In this sense all resulting shapes are smooth and fair. The first example, a shape of cube topology, demonstrates the effects of using different fairness criteria upon the character of the resulting shapes when constraints are relatively loose. The second example, a container ship hull form with bulbous bow and transom stern, presents a fairing application with numerous, rather tight constraints and multiple regions of distinct shape character connected with C 1 joint transition strips. It illustrates

1 Figure 8: Irregular transition meshes (left column) and surfaces (right column); Transition strips between regions and cap of bulbous bow. The --4 indicate irregular mesh points.

96

how regular and irregular mesh regions can be locally faired and globally combined into a noisefree, high quality fair surface. In summary the methodology is capable of generating fair and smooth surfaces, optimized by quantitative variational fairness criteria, from given irregular curve mesh data of rather arbitrary topology, also for multiple, smoothly connected fairing regions.

References [1] Applegarth, I., Kaklis, ED. and Wahl, S. Benchmark Tests on the Generation of Fair Shapes subject to Constraints, B.G. Teubner Publ., Stuttgart and Leipzig, 1998.

[2] Barnhill, R. E. ComputerAided Surface Representation and Design in R.E. Barnhill, W. Boehm (eds.), Surfaces in ComputerAided Geometric Design, North Holland Publ. Co. Amsterdam, New York, Oxford, 1983, ISBN 0-444-86550-0. [3] Bercovier, M., Volpin, O. and Matskevich, T. Globally G1 Free Form Surfaces Using Real Plate Energy lnvariant Methods, in: Le M6haut6, A., Rabut, C. and Schumaker, L.L., eds., Curves and Surfaces with Applications in CAGD, Vanderbilt University Press, 25-34. [4] Charrot, P. and Gregory, J.A. A Pentagonal Surface Patchfor Computer Aided Geometric Design, Computer Aided Geometric Design 1 (1), 87-94.

[5] Farin, G. Curves and Surfacesfor Computer Aided Geometric Design: A Practical Guide, 4th edn., Academic Press, New York, 1997.

[6] Gravesen, J. and Ungstrup, M. Constructing Invariant Fairness Measuresfor Surfaces, Mat-Rept. No. 98-20, Dept. of Mathematics, Techn. Univ. of Denmark, Lyngby, 1998.

[7] Gregory, J.A. C1 Rectangular and Non-Rectangular Surface Patches, Barnhill, R.E. and Boehm, W., eds., Surfaces in Computer Aided Geometric Design, North Holland Publ. Co., 2533, 1982.

[8] Gregory, J.A. and Hahn, J.M. Geometric Continuity and Convex Combination Patches, Computer Aided Geometric Design 4 (1-2), 79-89, 1987

J

[9] Greiner, G. Modelling of Curves and Surfaces Based on Opt#

Figure 9: Regular surface areas (given in different scales); Midbody, transom stern, bulbous bow, stern bulb.

mization Techniques, in: Nowacki, H. and Kaklis, P.D., eds., Creating Fair and Shape-Preserving Curves and Surfaces, B.G. Teubner Publ., Stuttgart and Leipzig, 1998. [10] Hagen, H. and Schulze, G. Automatic Smoothing with Geometric Surface Patches, Computer Aided Geometric Design 4 (3), 231-236, 1987. [11] Hahn, J.M. Filling Polygonal Holes with Rectangular Patches, in: Strasser, W. and Seidel, H.-R, eds., Theory and Practice of Geometric Modeling, Springer-Verlag, Berlin, 1989. [12] Hoschek, J. and Lasser, D. Fundamentals of Computer Aided Geometric Design, A.K. Peters, Wellesley, MA, translated by L.L. Schumaker, 1993. [13] ITTC Resistance and Flow Committee: Recommendations to the 20th ITTC, 20th International Towing Tank Conference, Vol. 1, San Francisco, CA, USA, 1993.

97

[21] Nowacki, H., Westgaard, G. and Heimann, J. Creation of Fair Surfaces Based on Higher Order Fairness Measures with Interpolation Constraints, in : Nowacki, H. and Kaklis, P.D., eds., Creating Fair and Shape-Preserving Curves and Surfaces, B.G. Teubner Publ., Stuttgart and Leipzig, 1998.

[14] Jin, E Directional Surface Fairing of Elongated Shapes, in: Nowacki, H. and Kaklis, ED., eds., Creating Fair and ShapePreserving Curves and Surfaces, B.G. Teubner Publ., Stuttgart and Leipzig, 1998. [15] Kallay, M. and Ravani, B. Optimal Twist Vectors as a Tool for lnterpolating a Network of Curves with a Minimum Energy Surface, Computer Aided Geometric Design 7 (6), 465-473, 1990.

[22] Peters, J. Biquartic C1-Surface Splines over Irregular Meshes, Computer-Aided Design 27 (12), 895-903, 1995. [23] Sarraga, R.F. G1 Interpolation of Generally Unrestricted Cubic B,zier Curves, Computer Aided Geometric Design 4 (1-2), 23-39, 1987.

[16] Koelman, H. Computer Support for Design, Engineering and Prototyping of the Shape of Ship Hulls, Ph.D. Thesis, Technische Universiteit Delft, 1999.

[24] Waiter, H. Numerical Representation of Surfaces Using an Optimum Principle, in German, dissertation, Techn. Univ. of Munich, 1971.

[17] Liu, D., Hoschek, J. GC 1 continuity conditions between adjacent rectangular and triangular B~zier surface patches. Computer-Aided Design 21,194-200, 1989.

[25] Westgaard, G. Construction of Fair Curves and Surfaces, Ph.D thesis, Techn. Univ. of Berlin, Unipub Forlag, Oslo, 2000.

[18] Luenberger, D . G . Linear and Nonlinear Programming, second edition. ADDISON-WESLEY PUBLISHING COMPANY 1984.

[26] Ye, X. Construction and Verification of Smooth Free-Form Surfaces Generated by Compatible Interpolation of Arbitrary Meshes, dissertation, Techn. Univ. of Berlin, K6ster Verlag, Berlin, 1994.

[19] Michelsen, J. A Free-Form Geometric Modelling Approach with Ship Design Applications, Ph.D thesis, Techn. Univ. of Denmark, Dept. of Naval Architecture and Ocean Engineering, Lyngby, 1995.

[27] Ye, X., Nowacki, H. and Patrikalakis, N.M. GC 1 Multisided Bdzier Surfaces, Engineering with Computers 13 (4), 222-234, 1997.

[20] Nowacki, H. and Reese, D. Design and Fairing of Ship Surfaces, Barnhill, R.E. and Boehm, W., eds., Surfaces in Computer Aided Geometric Design, North Holland Publ. Co., 2533, 1983.

[28] Ye, X. Curvature Continuous Interpolation of Curve Meshes, Computer Aided Geometric Design 14 (2), 169-190, 1997.

98