9
Computer-Aided&sign, Vol. 29, No. 11, pp. 791-799, 1997 Q 1997 Elsevier Science Ltd. All rights resewed ELSEVIER PII: SOOlO-4485(97)00025-O Printed in Great Britain 0010~4495/97/$17.00+0.00 Approximation of measured data with interval B-splines S T Tuohy, T Maekawa*, G Shen* and N M Patrikalakis*t The pbjective of this paper is to provide an efficient and reliable method for interpolating or approximating a set of measured data with an interval B-spline curve or surface. In general, measured data possess uncertainty, arising from sensor precision and measurement registration, which can be represented as an interval. Both the interpolation and approximation techniques presented in the paper produce interval bounding geometries that strictly enclose the intervals of the original data; in the case of our interpolation method, the achieved fit is extremely tight, and in the case of our approximation technique the achieved fit depends on the number of control points one is willing to allow. Examples using measured data illustrate our method. 0 1997 Elsevier Science Ltd Keywords: reverse engineering, robust solid modeling, interval methods, fitting INTRODUCTION The advent of accurate 3D imagers that provide the capability of producing precise data sets has created interest in automated methods for reverse engineering, i.e. the process of creating a complete CAD model from measured data. Typical to the reverse engineering field are develop- ments in three areas: (1) devices for data collection; (2) registration of data from multiple views; (3) surface fitting and topological representations. State-of-the-art sensors are capable of efficiently pro- viding dense sets of x,y,z data points with high position accuracy. However, these data always possess uncertainty arising from sensor precision and measurement registration. In addition, most algorithms for surface reconstruction require the manipulation of geometric and topological representations with complex operations (e.g. Booleans) which may lead to numerical instabilities. For example, in Hoover et al. * a polyhedral boundary representation (B-rep) model is constructed from multiple range images by Boolean intersections. In this method, each image is developed as a complete B-rep with polyhedral surfaces and contains a set of regions representing the union of the CS Draper Laboratory, Cambridge, MA 02139, USA *MIT, Department of Ocean Engineering, Design Laboratory, Cambridge, MA 02139, USA j’Author to whom correspondence should be addressed Paper Received: 19 October 1995. Revised: 11 April 1997 real object and the projection of the object onto the viewing plane. After these separate images are collected, the final B- rep is composed from the intersection of all of the different views. If the original B-reps are precise (correct) then the final B-rep should be correct. However, many sources of error were identified due to noise in the collected data which led to instabilities in the final intersection operation and necessitated complex surface stitching algorithms to complete the B-rep model. The representation of uncertainty for reverse engineering applications has been identified as a critical need, for example see Saucy and Laurendeau.23 In their work, a spatial neighborhood test, which relies on the formulation of uncertainty polyhedra, is used to delineate discontinuities from common surface elements over successive range images. This is useful in edge detection and data registration (identifying the common or overlapping information con- tent from two or more range views). Even in the absence of measurement uncertainty, all state-of-the-art CAD systems based on floating point arith- metic (FPA) frequently fail. The ultimate reason for this failure is the practically limited precision of most geo- metrically important computations. Any sequence of operations on a digital computer is essentially equivalent to a finite sequence of manipulations on a discrete grid of points. A solid object bordered by free-form surface patches is generally described with a B-rep, where the boundary surfaces are usually given by spline functions. The combi- natorial (topological) information defining how the various patches are glued together to build a complicated solid is described in an adjacency graph. Assembling a collection of surface patches (of limited precision) to create boundaries of solids will frequently yield gaps in boundary parts, see Hu et al., ‘iJ2 which will only be magnified when the geometry is based on data with measurement uncertainty. These gaps will, therefore, yield ambiguities in the definition of point sets contained in the interior of the solid. Therefore, we may get vaguely defined solids which yield even more vaguely defined objects when they are used in Boolean operations, such as building an object from intersections of solid volumes. In order to provide the basis for a consistent method for dealing with uncertainty in non-linear geometric models (and in operations on these models), we propose a geometric and topological representation paradigm for reverse engi- neering using methods for robust solid modeling based on rounded interval arithmetic (RIA). In our approach, instead of using plain floating point representations of B-spline patches, we have developed a new representation based on interval B-splines (IBS).26 Interval piecewise polynomial 791

Approximation of measured data with interval B-splines

Embed Size (px)

Citation preview

Page 1: Approximation of measured data with interval B-splines

Computer-Aided&sign, Vol. 29, No. 11, pp. 791-799, 1997 Q 1997 Elsevier Science Ltd. All rights resewed

ELSEVIER

PII: SOOlO-4485(97)00025-O Printed in Great Britain

0010~4495/97/$17.00+0.00

Approximation of measured data with interval B-splines S T Tuohy, T Maekawa*, G Shen* and N M Patrikalakis*t

The pbjective of this paper is to provide an efficient and reliable method for interpolating or approximating a set of measured data with an interval B-spline curve or surface. In general, measured data possess uncertainty, arising from sensor precision and measurement registration, which can be represented as an interval. Both the interpolation and approximation techniques presented in the paper produce interval bounding geometries that strictly enclose the intervals of the original data; in the case of our interpolation method, the achieved fit is extremely tight, and in the case of our approximation technique the achieved fit depends on the number of control points one is willing to allow. Examples using measured data illustrate our method. 0 1997 Elsevier Science Ltd

Keywords: reverse engineering, robust solid modeling, interval methods, fitting

INTRODUCTION

The advent of accurate 3D imagers that provide the capability of producing precise data sets has created interest in automated methods for reverse engineering, i.e. the process of creating a complete CAD model from measured data. Typical to the reverse engineering field are develop- ments in three areas: (1) devices for data collection; (2) registration of data from multiple views; (3) surface fitting and topological representations.

State-of-the-art sensors are capable of efficiently pro- viding dense sets of x,y,z data points with high position accuracy. However, these data always possess uncertainty arising from sensor precision and measurement registration. In addition, most algorithms for surface reconstruction require the manipulation of geometric and topological representations with complex operations (e.g. Booleans) which may lead to numerical instabilities. For example, in Hoover et al. * a polyhedral boundary representation (B-rep) model is constructed from multiple range images by Boolean intersections. In this method, each image is developed as a complete B-rep with polyhedral surfaces and contains a set of regions representing the union of the

CS Draper Laboratory, Cambridge, MA 02139, USA *MIT, Department of Ocean Engineering, Design Laboratory, Cambridge, MA 02139, USA j’Author to whom correspondence should be addressed Paper Received: 19 October 1995. Revised: 11 April 1997

real object and the projection of the object onto the viewing plane. After these separate images are collected, the final B- rep is composed from the intersection of all of the different views. If the original B-reps are precise (correct) then the final B-rep should be correct. However, many sources of error were identified due to noise in the collected data which led to instabilities in the final intersection operation and necessitated complex surface stitching algorithms to complete the B-rep model.

The representation of uncertainty for reverse engineering applications has been identified as a critical need, for example see Saucy and Laurendeau.23 In their work, a spatial neighborhood test, which relies on the formulation of uncertainty polyhedra, is used to delineate discontinuities from common surface elements over successive range images. This is useful in edge detection and data registration (identifying the common or overlapping information con- tent from two or more range views).

Even in the absence of measurement uncertainty, all state-of-the-art CAD systems based on floating point arith- metic (FPA) frequently fail. The ultimate reason for this failure is the practically limited precision of most geo- metrically important computations. ’ Any sequence of operations on a digital computer is essentially equivalent to a finite sequence of manipulations on a discrete grid of points. A solid object bordered by free-form surface patches is generally described with a B-rep, where the boundary surfaces are usually given by spline functions. The combi- natorial (topological) information defining how the various patches are glued together to build a complicated solid is described in an adjacency graph. Assembling a collection of surface patches (of limited precision) to create boundaries of solids will frequently yield gaps in boundary parts, see Hu et al., ‘iJ2 which will only be magnified when the geometry is based on data with measurement uncertainty. These gaps will, therefore, yield ambiguities in the definition of point sets contained in the interior of the solid. Therefore, we may get vaguely defined solids which yield even more vaguely defined objects when they are used in Boolean operations, such as building an object from intersections of solid volumes.

In order to provide the basis for a consistent method for dealing with uncertainty in non-linear geometric models (and in operations on these models), we propose a geometric and topological representation paradigm for reverse engi- neering using methods for robust solid modeling based on rounded interval arithmetic (RIA). In our approach, instead of using plain floating point representations of B-spline patches, we have developed a new representation based on interval B-splines (IBS).26 Interval piecewise polynomial

791

Page 2: Approximation of measured data with interval B-splines

Approximation of measured data with interval B-splines: S T Tuohy et a/.

curves and surfaces differ from classical polynomial curves and surfaces in that the real numbers representing control point coordinates are replaced by intervals.15 Hence. the classical control point vectors are replaced by rectangular boxes. This implies that, in 3D space, interval piecewise polynomial surface patches represent volumes formed by thin shells, and interval polynomial curves represent slender tubes, if the intervals are chosen sufficiently small. In gen- eral, the control points of the given curve or surface are defined or constructed in accordance with the measurement uncertainty associated with the measured data. As the geo- metric processing proceeds, the width of the interval grows gradually so that the interval always contains the exact result, provided that rounded interval arithmetic I5 is used for all arithmetic operations. Note that the width of intervals does not grow significantly under usual geometric proces- sing. Typically, a zero width interval may grow to be of the order of 10e6 to lo-‘” after a significant number of numer- ical operations encountered in root solving, Boolean opera- tions, etc.

The concept of interval polynomials comes up naturally when evaluating the error of a computational process. Interval polynomials and the related range of functions con- cept have been used by numerical analysts working on numerical1 verifiable methods since the early 1960s e.g. in Moore, ’ Hansen6 and Ratschek and Rokne,” but have only recently begun to be used in the geometric modeling, computer graphics and CAD communities. Mudur and Koparkar,16 Toth,24 Enger,S Duff4 and Snyder” applied interval algorithms to geometry processing. Interval BCzier curves were first studied and applied by Sederberg and Farouki *’ and by Sederberg and Buehler*” in curve approximation. Interval explicit B-spline surfaces were studied by Tuohy and Patrikalakis.26 Interval arithmetic is also used in nonlinear polynomial system solvers in Maekawa and Patrikalakis, I4 in intersection problems in Hu et a1.9.‘0 in solid modeling in Hu et al.“.“. in design automation in Bliek,2 and in robust visualization in Tuohy et al. 27

In this paper, we will present methods for the creation of curves and surfaces from data with associated bounds on measurement error so that they can be used for robust solid modeling operations. The problem of fitting a curve or a surface to a number of given interval data points can be approached using interpolation or approximation. Inter- polation means that the interval curve or surface precisely encloses the interval data points such that it has ranges equal to those of the data at the locations of the points. Approxi- mation means that the interval curve or surface only nearly matches the interval data points but still forms an enclosure around them, see Figure 1. These methods assist in auto- matic and robust reconstruction of an artifact.

In the following, we first give a brief review of interval arithmetic. Then, we define interval B-spline curves and surfaces with methods for fitting interval data. Finally, we present numerical examples and offer some concluding remarks.

INTERVAL REPRESENTATION

In order to represent uncertainty, bounds of errors will be represented by intervals instead of the more commonly used

point approximations. In the literature, computations involving bounded intervals are well defined and are referred to as interval arithmetic. “I5

792

Figure 1 Interval data fitting

An interval X is defined as the set of real numbers x such that

[X] = (XIX’ 5 x 5 X”) (1)

where the superscripts u and 1 refer to the upper (or maxi- mum) and lower (or minimum) bounds respectively of the interval. Furthermore, the mean or midpoint is defined as

XT x1+x”

2 (2)

the width or range as

‘V([X])=X” -x1 (3)

and the absolute value as

l[X]l =max( IX’I, IX”l] (4)

Interval arithmetic operations are defined for the usual alge- braic operators 0 E { +, -;,/} by

XOY=cl(xOvlxEX,yE Y) (5)

or more explicitly

]x’,xU]+[Y’,Y”] = [x’+Y’,x”+Y”]

IX’, X”] - [Y’, Y”] = 1x’ - Y”,X” - Y’]

[X’,X”].[Y’, Y”] = [min(X’Y’,X’YU,X”Y’,X”YU),

max(X’Y’,X’Y”,X”Y’,X”Y”)]

LX’, x”1

[Y’, Y”] =

(6)

where, in the division formula, 0 @ [Y’, Y”]. Note that each operation produces a new interval. In addition, the use of rounded interval operators, referred to as rounded interval arithmetic (RIA), permits the implementation of these operators on a computer with floating point arithmetic leading to conservative enclosures, i.e. the interval expressed with floating point numbers encloses the interval computed with infinite precision arithmetic. For example, we can redefine Equation (5) such that all machine opera- tions satisfy the inclusion principle

LX’, X”]O[Y’, Y”] = [Z’, Z”] c [Z’ - 2, Z” + e”] (7)

where t” or e’ are associated with Z” or Z’ respectively, and are defined as t = 2exp- 53 for the IEEE standard double- precision having 64 bits, 8 bytes word size, and stored in a binary form as ( + )m.2exP, where m is the mantissa (0.5 i m < 1) and exp is the exponent of Z.

Page 3: Approximation of measured data with interval B-splines

Approximation of measured data with interval B-splines: S T Tuohy et a/.

IBS CURVES AND SURFACES

An interval B-spline is defined as a B-spline with interval coefficients and knot vector(s) consisting of real numbers. In practice, the interval coefficients and the knot vector(s) will be expressed in terms of floating point numbers. For an interval B-spline curve of order-M, each control point is represented by an interval vector [D]i = [6:, $1 such that

(8) i=O

where Ni,M is the B-spline basis function assumed to be computed exactly with rational arithmetic. Equation (8) represents a slender tube consisting of a family of curves whose control points are located inside the rectangular ranges defined by the interval control points, i.e. an interval B-spline curve is the family of all such curves. Similarly, for an interval B-spline surface patch of order kf,N in u,v parametric d&ections,iea$G control point is represented by an interval [Q]i,j = [Qi,j, Qi,j] and the patch definition is

Il;l~,.cu,.,=~~~,,cu,v,,~,.cu,v~l= (9)

m-lit-1

x x tGli,jNi,dU>Nj,dv) i=O j=O

which is a thin shell defining a volume in the space.

FITTING

Interval data fitting can be accomplished by either interpolation or approximation. When an exact fit of the data is required, interpolation should be used. By contrast, approximation is used when the number of interval data points is large and/or data reduction is beneficial.

Interval cubic B-spline curve interpolation

By the definition of an interval B-spline curve given in the preceding section, the interpola$on problem is described as: given a set 9f interval points Lp]j, find 9 set of interval control points [O]i, which makes [P](Uj) = [P]j for 0 I ij 5 n - 1, where Uj is the single-valued parametric value associated with the jth interval point and n is the number of data points as well as the number of control points, so that there is a one-to-one correspondence between control points and data points (except for the ends). This is an n X n linear system with interval coefficients

n-l

[@]j = x [6]i[Nli,4(Uj) 0 s_i 5 n - 1 (10) i=O

or in matrix form

([h) =[BlI[fill (11)

where [N]i,4(Uj) is the RIA evaluation of B-spline basis, though the knot vector is made up of knots which are degenerated intervals (i.e. single floating point numbers). Evaluation of Ni,M(t) using rational arithmetic drastically increases computation time and we therefore opt to use RIA which guarantees that [N]i,M(Uj) > Ni,M(Uj).

We construct the knot vector as follows. First, the data points are parametrized by the chord-length method l8 (since

only approximate values are needed, the centers of the interval points are used to approximate the chord lengths), then the parametric values of all the points, except the two adjacent to the ends, arc used as knot values. The knot vector has a knot multiplicity of four at the ends to ensure that the resulting curve passes through the two endpoints. Thus, if the parametric values of the points are { Ui) , 0 5 i 5 n - 1, the knot vector can be expressed as

T={uo,Ug,Uo,~o,~2, .*-9 U,-3,U,-lrUn-l,U,-l,Un-l} . /

n+4

(12)

This method results in a highly banded interval coefficient matrix [B] which is generally non-singular as the LU- decomposition of [B] indicates. A specialized linear solver can be developed to minimize computation and storage requirements. M_eanwhije, by imposing thegosition bound- ary conditions [Dlo = [PI0 and [D], _ 1 = [PI, _ 1, the linear system is reduced to an (n - 2) X (n - 2) system

f $1, 1 ( @‘II - [hoWlo,&d I

PI2

I rai-_, I I ... [k2 - @‘I,-,[Nl,-1,&-2) I (13)

where [B’] is a tridiagonal matrix with two additional off-diagonal elements, and which can be easily LU- decomposed. The solution is determined by a set of recursive formulae, which can be easily derived from following a tridiagonal linear system solution in Reference 3.

As stated in Reference 1, if there exists a solution [xx] of equation [a][~] = [b], then [x] c [b]l[a], where [a], [b] and [x] are interval numbers. For a much more complex linear system as Equation (13), the s$ution retuped by the recur- sive formulae only ensures ( [P] ) C [B] ( [D] } , which means that the width of the resulting interval B-spline curve will be looser than the widths of the given points. Numerical experi- ments show that the width of the interval curve is generally several times that of the given point at an interpolation position. A minimization process, therefore, is used to shrink the interval curve, based on the requirement that the resulting curve should envelop the. points as tightly as possible. The objective function, therefore, isz6

n-1

$1 = w([?J(Uj)) = W x [fili[Nli,~(Uj) isO (14)

Oljln-1

subject to

[Pl(uj) 2 [hj

W([pl(uj)) s ; (15)

where ij is a selected maximum allowable value. The compar- ison of vectors in Equation (15), as well as elsewhere in this paper, should be interpregd for each component separately.

Since the width of [P](Uj) is mainly attributed to the widths of the control points and

n-l n-1

x siNfd(Uj), x fiyNtd(uj) c IPI i=O i=O 1

(16)

793

Page 4: Approximation of measured data with interval B-splines

Approximation of measured data with interval El-splines: S T Tuohy et al.

(see the Appendix for an explanation), the minimization problem can be reformulated in terms of a new objective function

with constraints

ew,) 2 13;

W([D]i) ~ ; (18)

Osi,jsn-I

Kearfott l3 developed a technique to compute optimal pre- conditioners for the interval Gauss-Seidel method by a linear programming (LP) approach. Here we also use an LP process to solve the minimization problem with the objective function in Equation (17) and the constraints of Equation (18) by introducing 6n auxiliary variables, which represent the lower and upper bounds of the n interval 3D control points. In such a way, both the objective function and the constraints are transformed into linear equations.

For the .x component of the interval 3D control points (similarly for y and z components), set [D,]; = [Xi,X, ,_,(I. 0 5 i 5 II - 1. Now we wish to minimize

F, = x b-i+n -xi) (19) i = 0

with constraints

1 = n

O(Xi+,,- x;9w,. Osirn-I

or in matrix form

(611 5 A(r) 5 {h,) (21)

where A jnxZn is the single-valued constraint matrix, (h,) and (b,} are the single-valued bounding vectors, and

(22)

I- 1 x . . . - x , P,yJ,,...,P:‘,,l.,> O,.~.,O]’ w=d’ w

n t1 II

WLb~~~>P.~,,Id> =>‘..?‘I;? W%,..~~~,Y {hll= LL”-. w -

n n n

(23)

where BI = (NYzt(Uj))rzXtr> O%ijSn- I,andIisthenXn unit matrix.

The number of iterations performed in the minimization depends upon the number of control points and data and the quality of the initial set of selected control points. The

794

number of data is fixed with the given problem; therefore, one way to reduce processing time is to give good initial values. We have found that the set of loose control points obtained from the recursive formulae for interpolation mentioned before lead to quick convergence and, therefore, can be used effectively.

Interval cubic B-spline approximation

In interval data approximation, both the approximation error and the data error are to be incorporated into the residual error associated with the resulting curve. This requires that the curve encloses the given data points. Directly following the interpolation problem, the approximation problem can be approached again as a minimization problem using the LP approach, but now with a reduced set of control points.

The construction of the knot vector is most critical to the quality of the approximation, since it determines the number and the distribution of control points. A well-balanced knot vector will prevent the approximation curve from unevenly inflating so that the width does not vary dramatically along the curve. Such a knot vector can be constructed based on geometric information such as the curvature and the torsion of the curve. Since, initially, an explicit representation of the curve is not available, these geometric features can only be estimated from discrete points on the curve. We denote the centers of the given points as {pi} = (~;,y;,z,]~, 0 2 i 5 N - I, where N is the number of given points. The tangent vectors and the binormal vectors are approximated as

& = i, _ , x ij Iii_ , x ii1

l<i5N-2

(24)

(25)

and the angular variations At), and A0b are used as measures of the curvature and the torsion respectively, see Figure 2.

The procedure goes from fi2 through fi,,, 3. If the angular variations exceed a selected threshold at a point, the para- metric-value of this point is inserted as a knot and the current i and b are set as the references for calculating the angular variations; otherwise, no knot is needed.

To provide an initial approximation, we use the least squares method (LSM). The solution does not ensure feasibility, meaning that for the LP problem the initial guess does not satisfy the given constraints. Fortunately, most LP numerical packages accept initial values which are not feasible solutions.

If we rewrite an interval number in its midpoint-half- width form [X] =x+ E[ - 1, I], where E = w([XJ)/2 is the error associated with the midpoint or the half-width of [Xl,

Figure 2 Constructing the knot vector of the approximation curve

Page 5: Approximation of measured data with interval B-splines

Approximation of measured data with interval B-splines: S T Tuohy et al.

then an interval cubic B-spline curve has the form

[F](t) =&r) + [ -’ 1, 1$(t)

n-l _ n-1

= 1 I)iNi,4Ct) + [ - l, ll 1 2iNi,4(t) (26) i=o i=O

where i(t) is the -single-valued central curve defined by the centers 5. of [D]i, and z(t) is the associated error func- tion, which ii a piecewise polynomial in-the B-spline basis and defined by the half-wid{hs Zi of [D]i. Thus, we first approximate the centers of [P]j* 0 5 j 5 N - 1, using the LSM to obtain a set of single-valued control points E. and a global fitting error 2, then use the LSM again to approxi- mate the errors 2 + Gi by z(t), where 5, is the half-width of the ith interval data point. An interval B-spline curve can thus be defined by a set of control points

[~]]i=[~i-~i,~i+~i] O~iln-1 (27)

which does not ensure the enclosure of the given points but is accurate enough to be used as an initial value for the LP process.

Surface lofting for interpolation and approximation

If the collected data are grouped in stripes, as in Figure 9, and true for a lot of range devices, a simple and efficient way to recreate a surface is to loft a family of B-spline curves which are constructed by either interpolation or approxima- tion of the points on the stripes, see Reference 25. After lofting, the interpolation or approximation curves become the isoparametric curves of the resulting surface.

As the knot vectors of the curves are produced by the algorithms presented in the previous sections, they are different from each other and thus need to be merged to a common knot vector which is then the knot vector of the surface in one direction. For interpolation curves, if the number of data points on the stripes is identical, an average of the knot vectors is the most effective way for fitting each of the curves; otherwise, the knot vector with maximum size is used. In the latter case, the remaining knot vectors are adjusted to be subsets of the knot vector and knot insertion is needed. When those curves are approximation curves, we compare the knot vectors, and if two knots from different knot vectors are within a certain small tolerance, we take an average of them and replace them with the resulting average value; otherwise, we just merge them in an increasing sequence. The number of the knots K in the resulting knot vector is bounded as

M-l

where M is the number of stripes, and ki is the number of knots of the ith curve. The curve approximation is then accomplished on this merged knot vector. The final control points for the ith stripe are [O]i,j, where 0 5 i 5 M - 1,O I j I n - 1 and n = K - 4 is the number of the control points for a cubic function in that direction.

As the curves are to be the isoparametric curves of the resulting surface, each of them needs to be assigned a para- metric value uk, 0 5 k S M - 1. The parametrization can be done by-applying the chord-length method to the control points [O]i, j.

Since the approximation curve of the kth stripe now becomes the isoparametric curve of the resulting surface

at uk, 0 S k 5 A4 - 1, the following condition must hold

I?-la-1 n-l

izo ,go [6l$i,~(u/c,Ni,,(~)= 1 [51k,jy,4(v) (2% j=O

where m is the number of control points in the lofting direction.

Equation (29) is satisfied if and only if

m-1

z [CIi,ilV,,,(Uk) = [zI/c,j i=O

(30)

where 0 5 j I n - 1, since Nj,b(V) is the basis for splines of order four over a fixed knot vector.

Equation (30) is a set of n linear systems of M equations with m unknowns, all with the same coefficient matrix. They can be rewritten in matrix form as

@I [cl = [cl (31)

where

PI = ([NIi,4(Uk))O<k<M- l,Osizzrn - I

[Gl = ([6li,j)OSiSm- l,OSjSn - 1

+

(32)

(33)

PI = ([Dlk,j)OskSM - l,Osj<n - 1 (34)

In closing, the entire procedure of approximating interval data with an interval bicubic B-spline surface consists of the following steps.

(1)

(2)

(3)

(4)

(5)

Parametrize the data points on each stripe, construct the knot vector for each approximation curve. Merge the knot vectors of all the approximation curves to one knot vector. Use this knot vector to approximate the data points on each stripe with an interval cubic B-spline curve. Use the control points obtained in the last step to para- metrize the data points in the lofting direction, and construct the knot vector in that direction. Loft the interval cubic B-spline curves obtained in Step 3 to the resulting interval bicubic B-spline surface.

Mathematically, it is again a curve fitting problem, and can be solved by either curve interpolation or approximation. The knot vector in the u direction can be constructed in the same way as before.

For the approximation of a data set of size M X N with an interval B-spline surface having m X n control points, the running time is T(M, N) = O(MTl(N,n)) + O(nTl(M,m)), where Ti is the running time of the LP routine used and depends on the number of iterations. The number of opera- tions performed per iteration is roughly proportional to nf, where nf is the number of variables fixed on their upper or lower bounds. see Reference 17.

NUMERICAL EXAMPLES

As an example of the curve interpolation method, a set of 11 interval data points sampled uniformly from the first and the fourth quadrants of the ellipse

x = 10 cos(t), y = 5 sin(t), - ; It<: 2

(35)

with an artificial error _’ 0.05 (i.e. the widths are uniformly O.l), are interpolated by an interval cubic B-spline curve. Hence, the number of control points is 11, and the

795

Page 6: Approximation of measured data with interval B-splines

Approximation of measured data with interval B-splines: S T Tuohy et al.

Table 1 Result of the interpolation of a set of interval points sampled from the ellipse described by Equation (35)

Given points Evaluated points

L-0. I, 0.01 12.9. 3.01 [5.7, 5.81 [7.9, 8.01 [9.4, 9.51 L9.9. IO.01 [9.4, 9.51 17.9. 8.01 [5.7, 5.81 [2.9, 3.01 l-0.1. 0.01 [-5.1, -5.01 [-4.8,-4.71 [-4.1, -4.01 1-3.0. -2.91 I-1.6, -1.51 L-0. I, 0.01 11.4. 1.51 12.8. 2.91 13.9. 4.01 [4.6. 4.71 [4.9, 5.01

[-0.1000000005,5.000011e-IO] [2.8999999995, 3.0000000005 I 15.6999999995, 5.80000000051 [7.8999999995, 8.00000000051 [9.3999999995,9.50000000051 [9.8999999995, lO.OOOOOOOOl] [9.3999999995,9.50000000051 (7.8999999995. 8.0000000005] L5.6999999995, 5.8000000005) (2.8999999995, 3.00000000051 [-0.1000OOG005, 5.000013+101 [-5.lOcOOOOOO5. -4.99999999951 [-4.8OOOOOOOO5, -4.69999999951 I-4.1oOOOOoOO5. -3.99999999951 I-3.OOOOoooOO5, -2.89999999951 [ - 1.6000000005. - I .4999999995 1 [-0.1000000005,5.000022e-IO] ( I .3999999995. I .5OOOOOOOOs] 12.7999999995, 2.9000000005 I [3.8999999995, 4.0000000005 I [4.5999999995. 4.7000000005] [4.8999999995, 5.0000000005 I

dimension of the knot vector is 15. Table I shows that no enclosure violation exists, by comparing the given points with the points evaluated at the interpolation positions on the resulting curve. The average width of the evaluated points is only 1.00000001 times of that of the given points. The small inflation of width is introduced by RIA. Figure 3 shows the enveloping curves of the interval curve. The running time is less than 2 s on a 33 MHz graphics workstation.

The next example is the approximation of 101 points uniformly sampled from a helix described by

x = cos(t), _y = sin(t), i = &, 05t527r (36)

with artificial errors in Gaussian distribution ranging from 0.0 to 0.001, i.e. the maximum width is no larger than 0.002. As discussed before, the increase in the width of the approxi- mation curve is directly related to the selection of the knot vector. Table 2 gives the results of approximations with dif- ferent control variables. In this table, the thresholds of the angular variations A0, and ABb in knot estimation, 0, and 8,. are given in degrees. Large values lead to a fewer number of control points and to looser bounds of the interval curve. Here 01 is the maximum permissible ratio of the widths of the desired control points to the average width of the given points. We can see from this table that, for a certain width requirement, a relatively small number of control points is needed. Further reduction of the number of control points increases the width of the interval curve, see Table 2.

The second approximation curve is obtained by fitting 100 evaluated points on an isoparametric curve of a skewed propeller blade which already has an idealized B-spline

Table 2 Comparison of some examples of curve approximation (helix) with different tolerances

btd Result I Result 2 Result 3

8, and 0, 15.0 30.0 45.0 01 7.0 7.0 18.0 Control points 52 36 23 Avg. width in X 0.0017 0.0117 0.01 IX 0.0307 Avg. width in Y 0.0018 0.0127 0.0 129 0.033 I Avg. width in Z 0.0015 0.0106 0.0 106 0.0273 Running time (s) 40 22 12

Figure 3 Lower and upper bounding curves of the resulting interval curve of the ellipse interpolation example

Vr

K’igure 4 A skewed propeller blade

Figure 5 Interval curve approximating a set of points on the blade shown in Figure 4

representation, see Figure 4. The points (with uniform width 0.001) are fitted by a B-spline curve with 16 control points, and the average width of the fitting points on the curve is 0.007. The knot vector

{O, 0, 0, 0, 0.1967, 0.3529, 0.4476, 0.4831, 0.4948,

0.5008, 0.5068, 0.5173, 0.5492, 0.7037, 0.8584,

0.9722, 1, 1, 1, 1)

shows that more knots are used around the leading edge (corresponding to a parameter value = 0.5 and found at the lower left portion of Figure 5). Figure 5 displays a dense set of points on the curve. The running time is 8 s.

In the next example of curve approximation, the data points are evaluated uniformly from a sinusoid curve with high-frequency described by

Y = 10 sin x/20 + sin x/2 x E [0,20n] (37)

The total number of data points is 101, and the width is set uniformly as 0.1. The approximation curve uses 10 control points for great data reduction. The average widths of the evaluated points at the fitting positions on the interval curve are 3.3897 and 11.9847 in the x and y directions respectively. Figure 6 shows the data points and the interval approximation curve by displaying two enveloping curves (in the same region as the data points).

As an example of interval surface fitting, the blade of Figure 4 is evaluated uniformly on a grid of size 20 X

100, and then the data (with uniform width 0.001) is approximated by an interval bicubic B-spline surface with 20 X 30 control points. The average width of the control

796

Page 7: Approximation of measured data with interval B-splines

Approximation of measured data with interval B-splines: S T Tuohy et al.

Figure 6 Interval B-spline curve which approximates a set of data points sampled from a sinusoid curve with ten control points. The interval curve is shown by two enveloping curves, between which are the dam points. In the figure, the small rectangles represent the positions rather than the sizes of the interval data

Figure 7 Interval surface approximating a set of points on the blade shown in Figure 4

Figure 8 Picture of the model that was measured

Figure 9 Data collected from model shown in Figure 8 and color-coded with respect to depth. Depth ranges in magnitude from zero to one

Figure 10 Interval surface that was fit to the data of Figure 9. Upper bounding surface shown in wireframe, lower bounding surface shown shaded

Table 3 Result of surface approximation of real measured data of surface shown in Figure 8

No. of the given data points 2698 No. of control points in u direction 32 No. of control points in Y direction 33 Average width of the given points 10-4 Average width of the fitting points 0.0240 Running time (s) 583

points is 0.046. Figure 7 shows the resulting surface by displaying a dense set of interval points on the surface. The running time is 265 s.

For the second surface approximation example, data was obtained using the 4D imager manufactured by Intelligent Automation Systems, of Cambridge, MA, a state-of-the-art device capable of efficiently providing dense sets of x,y,z data points with low position uncertainty. The 4D imager uses a fan of laser planes for illumination and multiple video cameras to determine the locations of the projected stripes. Robust algorithms disambiguate the stripes, and triangula- tion is performed to yield a dense image. The precision of the instrument is four effective decimal digits; therefore, the practical error is no more than 0.00005, and the widths of the data are 0.0001.

The data were taken from a manufactured part (see Figure 8) milled to represent the function

z(x, y) = sin(27rx) sin(ny)

and included 32 fan lines projected on the model. From each line, over 80 points were collected (see Figure 9).

Since the data contains high-frequency noise (due in most part to the tool used for manufacturing), a Gaussian filter is passed over the data before the knot vectors are constructed. The curves, however, are fit to the original data, including noise. The oscillation of the data due to this noise causes an overestimate of the knots that are needed for fitting; thus, the filter is used so that only the true features of the curves are considered.

The noise in the real data also causes expected increases in the widths of the approximation curves. If the approximation procedure is again used for surface lofting, the widths of the control points will be further enlarged. Considering that the data lines in the lofting direction are not as dense (only 32 stripes), the interpolation procedure is the better approach.

Table 3 gives the results of the example and the surface is shown in Figure 10. It can be seen that the average width of the fitting points on the surface is much larger than that of the given data. The reason is that the magnitude of the oscillation of the given points due to the noise is much larger than the widths of the given points and, therefore, the interval surface has to use much larger widths to fit the oscillation in the given data points. To illustrate how big the oscillation is, a single-valued cubic B-spline curve is used to approximate one of the data stripes. The global fitting error reaches 0.001096, which could be doubled since the data points are located on two sides of the approxi- mation curve. Considering the order of the deviation, the fitting results are satisfactory.

The next surface approximation example demonstrates how the interval representation could be used to reach the position continuity between two adjacent patches. We take two rectangular subsets of the data in the preceding example (see Figure II), and approximate them with two single-valued surfaces and two interval surfaces. These two data sets have one common set of edge points. A gap is generated on that edge in the single-valued approximation

797

Page 8: Approximation of measured data with interval B-splines

Approximation of measured data with interval B-splines: S T Tuohy et al.

.......................... ...................... _ ...

........ -0.*,_. ...... ..................................... __ “s,

....... -cc” .........................

.... ..- -r ....................... z

-“” ........................................ “._ .......

...... _ - ............................................... _._

........ _. ........... e.. ................................ .._

......... _ ._._ ...... . .......................... .“. .... I.._-- -

.... a....- - .- ........... . .................................... .e---

............................................................ . . . . ... _..I._ .....

.................................................. . ..................................

Figure 11 Two rectangular subseta of the data points in Fi,qurv 9, having a common set of edge point\

Figure 12 Gap between two single-valued approximation patches

Figure 13 Intersection between two interval approximation patcheh. Upper bounding surfaces shown in wireframe. lower bounding surfaces shown shaded

(see Figure 12), whereas in the interval approximation two interval patches intersect, since both patches enclose the common set of edge points, provided that the sampling density on the edge is high enough, see Figure 13.

For higher order continuity, methods developed in Refer- ence 26 may be extended.

CONCLUSION

In this paper, we have demonstrated fitting techniques to produce interval B-spline curves and surfaces from given data with measurement uncertainties. Features of the paper include the use of the LP technique to reduce the error propagation in interval computation and the use of RIA for increased robustness. The ability to represent, in a consistent manner, the uncertainty due to measurement error, and also of operations on these geometries, enables the establishment of a robust solid model from the data. The ability to create these geometries, in turn, allows for the use of robust solid modeling in reverse engineering where measured data are used. Without this ability to account for uncertainty, methods for producing CAD models directly from sensing devices are prone to inconsistencies and instabilities in computation.

Future work on the topic of interval solid modeling could include the problems of how to extract a single-valued com- plete solid model from an interval representation for render- ing and manufacturing.

ACKNOWLEDGEMENTS

Funding for this work was obtained, in part, from ONR and NSF under grant numbers N00014-94- 1 - 100 1, NO00 14- 95- l-01 84, and NOO014-96- l-0857; IRI-9224640.

APPENDIX REFORMULATION OF THE MINIMIZATION PROBLEM

If we let

Np I

lFltuj) = Li’tuj), i;“C”j)l = 1 [cli[Nli,4(Uj) (38) i = 0

then as Ni,d(Uj) 2 0, there exists the following relation

i

[D:Nf,$N”] > [ofNy,UYN:] if [g,li > 0

]~l;lNl, = @IN;, c,rN;] if 0 E [~]i

[ij)Ny, fir&] > [fiiNY,fiYNY] if [fi], < 0

(39)

where simplified notations have been used for a concise description. In summary

Lfili[Nli,4(+) 2 [~~Ni~~Cu;),~~N~~(uj)l (40)

and

(42)

L J

(41)

From Equation (39), we obtain that

M[~li[Nli,4(Uj)) - w(L~jN~,(u;),~~N~l(ui)l)

1

IOf IW([N]i,,(Uj)) if [fi,li > 6

= 6 if 6 E [~]i

IbuIW([N]i,4(11;)) if [fi,], < 6

1= ~lDli~w([Nli,4(uj))

It follows that

n-1

0 5 wC[@l(uj)) -w([~l’(uj)> 5 x I[fililW([Nli,4(U,)) i=O

(43)

Since W([N]i,4(Uj)) is extremely small (of the order of 10-‘5- 10-14), the constrair$s in Equation (15) can be satis- fied by setting [I’] > [P]j with only a very small change in width.

Furthermore, using the width theorem’ that

w([AI[BI) 2 maxt ~[Al~w(VU), ~[%C41))

MlAI[W) 5 ~[Al~wWI) + I[BlIw([Al)

(44)

(45)

798

Page 9: Approximation of measured data with interval B-splines

Approximation of measured data with interval B-splines: S T Tuohy et a/.

the width of the point with parametric value uj on the inter- val curve is bounded as

n-1

x m~(~[~li~w([~li.4(Uj)), ~[Nli,4(uj)~w([51i)~ i=O

n-1

5 x (I[~lilW([Nli,,(uj)) + I[Mi,,<uj>lw<[fili)> (46) i=O

Obviously, the width of [Z](Uj) is mainly attributed to the widths of the control points and, therefore, will be minimum if the widths of all the control points reach their permissible minimum.

REFERENCES

5.

9.

10.

11.

12.

13.

14.

15.

16.

17.

18. 19.

20.

21.

Alefeld, G. and Herzberger, J., Introduction to Interval Computations. Academic Press, New York, 1983. Bliek, C., Computer methods for design automation. PhD Thesis, Massachusetts Institute of Technology, Cambridge, MA, 1992. Dahlquist, G. and Bjorck, A., Numerical Methods. Prentice-Hall, Englewood Cliffs, NJ, 1974. Duff, T., Interval arithmetic and recursive subdivision for implicit functions and constructive solid geometry. ACM Computer Graphics, 1992,26(2), 131-138. Enger, W., Interval ray tracing-a divide and conquer strategy for realistic computer graphics. The Visual Computer, 1992, 9(2), 91- 104. Hansen, E., ed., Topics in Interval Analysis. Oxford University Press, Ely House, London, UK, 1969. Hoffmann, C. M., The problems of accuracy and robustness in geo- metric computation. Computer, 1989, 22(3), 3 l-41. Hoover, A., Goldgof, D. and Bowyer, K. W., Extracting a valid boundary representation from a segmented range image. IEEE Trans- actions on Pattern Analysis and Machine Intelligence, 1995, 17(9), 920-924. Hu, C.-Y., Maekawa, T., Pat&al&is, N.M. and Ye, X., Robust inter- val algorithm for surface intersections. ComputerAided Design, 1997, 29(9), 617-627. Hu, C.-Y., Maekawa, T., Sherbrooke, E. C. and Patrikalakis, N. M., Robust interval algorithm for curve intersections. Computer Aided Design, 1996,28(6/7), 495-506. Hu, C.-Y., Pat&ah&is, N. M. and Ye, X., Robust interval solid mod- eling: Part I: representations. Computer Aided Design, 1996, 28(10), 807-817. Hu, C.-Y., Patrikalakis, N. M. and Ye, X., Robust interval solid modeling: Part II: boundary evaluation. Computer Aided Design, 1996, 28(10), 819-830. Kearfott, R. B., Preconditioners for the interval Gauss-Seidel method. SIAM Journal of Numerical Analysis, 1990, 27(3), 804-822. Maekawa, T. and Patrikalakis, N. M., Interrogation of differential geometry properties for design and manufacture. The Visual Com- puter, 1994, 10(4), 216-237. Moore, R. E., Interval Analysis. Prentice-Hall, Englewood Cliffs, NJ, 1966. Mudur, S. P. and Koparkar, P. A., Interval methods for processing geometric objects. IEEE Computer Graphics and Applications, 1984, 4(2), 7-17. Numerical Algorithms Group, Oxford, UK. NAG Fortran Library Manual, Vols. 1-8, Mark 14 edn., 1990. Piegl, L. and Tiller, W., The NURBS Book. Springer, New York, 1995. Ratschek, H. and Rokne, J., Computer Methods for the Range of Functions. Ellis Horwood, Chichester, UK, 1984. Sederberg, T. W. and Buehler, D. W., Offsets of polynomial Bezier curves: hermite approximation with error bounds. In Mathematical Methods in Computer Aided Geometric Design, vol. II, ed. T. Lyche and L. L. Schumaker. Academic Press, Boston, 1992, pp. 549-558. Sederberg, T. W. and Farouki, R. T., Approximation by interval Bdzier curves. IEEE Computer Graphics and Applications, 1992, 15(2), 87-95.

22. Snyder, J. M., Interval analysis for computer graphics. ACM Com- puter Graphics, 1992,26(2), 121-130.

23. Saucy, M. and Laurendeau, D., A general surface approach to the integration of a set of range views. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1995, 17(4), 344-358.

24. Toth, D., On ray tracing parametric surfaces. ACM Computer Graphics, 1985,19(3), 171-179.

25. Tuohy, S. T. and Bardis, L., Low degree approximation of high degree B-spline surfaces. Engineering with Computers, 1993,9(4), 198-209.

26. Tuohy, S. T. and Patrikalakis, N. M., Nonlinear data representation for ocean exploration and visualization. Journal of Visualization and Computer Animation, 1996, 7(3), 125-139.

27. Tuohy, S. T., Yoon, J. W. and Patrikalakis, N. M., Reliable interroga- tion of 3-D non-linear geophysical databases. In Computer Graphics: Developments in Virtual Environments, Proceedings of CG Inter- national ‘95, Leeds, UK, June 1995, ed. J. A. Vince and R. A. Earnshaw. Academic Press, London, pp. 327-341.

Seamus T. Tuohy is a Senior Member of the Technical Staff in the Guidance, Navigation and Control Directorate of the Charles Stark Draper Laboratory. In addition, he holds an appointment as Lecturer at the MIT Department of Ocean Engineering. He received a Ph.D. in 1993, an Ocean Engineer’s degree and an SM. in Mechanical Engi- neering in 1992, all from MH, an M.S. in Engineen’ng in I988 and a B.S. in Naval Architecture and Marine Engineering in I986from the University of New Orleans. His current research focuses on simulation, integrated information display systems, navigation, C41, CAD, visuali- zation, and the representation and interrogation ofphysical parameters with uncertainty. (Address for Dr. Tuohy: The Charles Stark Draper Laboratory, Inc. MS 93, 555 Technology Square, Cambridge, MA 02139-3563, USA.)

Takashi Maekawa is Research Scientist and Lecturer at the MIT Department of Ocean Engineering Design Laboratory. His research interests include computational and differential geometry, and Compu- ter Aided Design and Manufacturing. He received a B.S. and an M.S. in Mechanical Engineering from Waseda University, Tokyo, in I976 and 1978 respectively, and an Ocean Engineer’s Degree from MIT in 1987. From I978 to I989 he worked for Bridgestone Corp. as a design and manufacturing engineer. He received his Ph.D. in Computer Aided Design and Manufacturing from MIT in 1993. Between September 1993 and August 1994 he has been a Postdoctoral Associate at MIT. (Address for Dr. Maekawa, Mr. Shen and Prof Patrikalakis: MIT, Department of Ocean Engineering, 77 Massachusetts Avenue, Cambridge, MA 02139-4307, USA.)

Guoling Shen is a graduate student in the Department of Ocean Engi- neering at MIT His interests include CAD/CAM, and computational geometry. He received his B.Eng. in Marine Engineering and Naval Architecture from Huazhong University of Science and Technology, China, in 1988.

Nicholas M. Patrikalakis is the Kawasaki Professor of Engineering at MIT. His research and teaching focus in the general area of applica- tions of computational geometry in design, analysis, simulation, visua- lization and fabrication of complex systems. For his work in CAD, he was earlier appointed Doherty Professor of Ocean Utilization (1988- 1990). He has served as consultant to various organizations, has sat on committees of several professional societies, is a member of the board of directors of the CGS, and participates in the editorial boards of several journals. He has served as program chair of Computer Gra- phics International ‘91, as guest editor of The Visual Computer, and as co-chair of the I994 NSF Design and Manufacturing Systems Grantees Conference. He received his Diploma in Naval Architecture and Mechanical Engineering in 1977from the National Technical Univer- sity of Athens, Greece, and his Ph.D. in Ocean Engineering in I983 from MIT

799