Parameter optimization in approximating curves and surfaces to measurement data

24
Computer Aided Geometric Design 8 (1991) 267-290 North-Holland 267 Parameter optimization in approximating curves and surfaces to measurement data Biplab Sarkar and Chia-Hsiang Menq Departmenr of Mechanical Engineering The Ohio Stare University, Columbus, OH 43201. USA Received August 1990 Revised March 1991 Abstract Sarkar. B. and C.-H. Menq, Parameter optimization in approximating curves and surfaces to measurement data. Computer Aided Geometric Design 8 (1991) 267-290. Curves and surfaces are often required to be approximated to the measurement data points in modeling industrial parts. A total approximation procedure involves assigning parameter values. least-squares fitting. and parameter optimization. In this article, a parameter optimization method is suggested based on the non-linear least-squares optimization procedure due to Levenberg-Marquardt. An explicit expression. for the sum of the squares of the fitting errors at each of the data p$nts, is minimized treatin, 0 the parameters as the variables. This optimization process has been compared with ^a number of published methods (Hoschek ‘88. Hoschek et al. ‘89, and Rogers& Fog ‘891 using cubic B-spline basis functions. Examples are provided for the approximation of curves and surfaces and their offsets. Ke~~w0cd.r. Parametric approximation, parameter optimization, least-squares fitting 1. Introduction Approximating curves and surfaces to measurement data plays an important role in the construction of car bodies, ship hulls, shoe insoles, airplane fuselages and wings. etc. Tradition- ally, manufacturing of these products used to start with a master model and the stamps and dies were obtained from the master model by copymilling. With the advent of high resolution laser scanners and coordinate measurement machines, the master model is now digitized and parametric surfaces are fitted to the discrete measurement data points creating a mathematical master model [Sarkar & Menq ‘911. The surfaces thus created are more often than not parametric surfaces because they are invariant with respect to coordinate transformations. In parametric approximation of curves and surfaces, digitized points P,(x,, y,, z,) of a curve or 4,(x,,, Ye,, z,, ) of a surface, are initially assigned parameters I, or (u,, 0,). These parameter values may be assigned using cumulative chord-length, equal increment [Faux & Pratt ‘791, or area-based method [Bez & Fillipe ‘841. Next a particular class of basis functions M, and a sequence of knots X,, i = 1, 2, . . . , h are chosen such that 0 c X, < 1. For instance, if there are m points P,, i = 1, 2, . . . , M, and these points are parametrized by assigning the values t,, i=l,2 3 . ..7 m, then these points can be approximated by the cubic B-spline curve [Hayes et al. ‘741 given by: h+4 at> = c +f,w (Ia) i=l 0167-8396/91/$03.50 0 1991 - Elsevirr Science Publishers B.V. All rights reserved

Transcript of Parameter optimization in approximating curves and surfaces to measurement data

Page 1: Parameter optimization in approximating curves and surfaces to measurement data

Computer Aided Geometric Design 8 (1991) 267-290

North-Holland

267

Parameter optimization in approximating curves and surfaces to measurement data Biplab Sarkar and Chia-Hsiang Menq Departmenr of Mechanical Engineering The Ohio Stare University, Columbus, OH 43201. USA

Received August 1990

Revised March 1991

Abstract

Sarkar. B. and C.-H. Menq, Parameter optimization in approximating curves and surfaces to measurement data.

Computer Aided Geometric Design 8 (1991) 267-290.

Curves and surfaces are often required to be approximated to the measurement data points in modeling

industrial parts. A total approximation procedure involves assigning parameter values. least-squares fitting. and

parameter optimization. In this article, a parameter optimization method is suggested based on the non-linear

least-squares optimization procedure due to Levenberg-Marquardt. An explicit expression. for the sum of the

squares of the fitting errors at each of the data p$nts, is minimized treatin, 0 the parameters as the variables. This

optimization process has been compared with ^a number of published methods (Hoschek ‘88. Hoschek et al. ‘89,

and Rogers& Fog ‘891 using cubic B-spline basis functions. Examples are provided for the approximation of

curves and surfaces and their offsets.

Ke~~w0cd.r. Parametric approximation, parameter optimization, least-squares fitting

1. Introduction

Approximating curves and surfaces to measurement data plays an important role in the construction of car bodies, ship hulls, shoe insoles, airplane fuselages and wings. etc. Tradition- ally, manufacturing of these products used to start with a master model and the stamps and dies were obtained from the master model by copymilling. With the advent of high resolution laser scanners and coordinate measurement machines, the master model is now digitized and

parametric surfaces are fitted to the discrete measurement data points creating a mathematical master model [Sarkar & Menq ‘911. The surfaces thus created are more often than not parametric surfaces because they are invariant with respect to coordinate transformations.

In parametric approximation of curves and surfaces, digitized points P,(x,, y,, z,) of a curve

or 4,(x,,, Ye,, z,, ) of a surface, are initially assigned parameters I, or (u,, 0,). These parameter values may be assigned using cumulative chord-length, equal increment [Faux & Pratt ‘791, or area-based method [Bez & Fillipe ‘841. Next a particular class of basis functions M, and a

sequence of knots X,, i = 1, 2, . . . , h are chosen such that 0 c X, < 1. For instance, if there are m points P,, i = 1, 2, . . . , M, and these points are parametrized by assigning the values t,, i=l,2 3 . ..7 m, then these points can be approximated by the cubic B-spline curve [Hayes et al. ‘741 given by:

h+4

at> = c +f,w (Ia)

i=l

0167-8396/91/$03.50 0 1991 - Elsevirr Science Publishers B.V. All rights reserved

Page 2: Parameter optimization in approximating curves and surfaces to measurement data

268 B. Sarkar. C.-H. Menq / Pnmmerer opnmcarron

where h + 4 < m. h being the number of internal knots (the parametric values at these knots lie between 0 and 1 as compared to the boundary knots which have parametric value of either 0 or l), M,(r) denotes the cubic B-spline basis function (equivalent to M4., evaluated by equations (5a) and (Sb) in Section 3) and c, are the control points. Similarly, a bicubic B-spline surface can be approximated to an ordered set of points, to which parameters (u,, u,), i = 1, . . . . m

and j=l. ._., n, have been assigned, by:

h-b4 k+4

(lb)

Again c,, are the control points, (h + 4) X (k + 4) < m X n, h and k are the number of internal knots and M,(u) and N,(u) are the B-spline basis functions in the two parametric directions. The approximation problem can now be divided into two parts. The first part is, given a set of

t, or (u,, u,), computing the control points by the least-squares technique, i.e., if we define the sum of the squares of the error vector magnitudes as:

e(c, t)= f (<-C(f,))‘= f P:- ‘i4c,MJ(l,) i i

2

(2a) i=l !=I j=l

or

u,. “,,)‘= F i e, - hi4 k~4c,sM,(u,)Iy(L;) 2 i-1 j=I i=* j=] i r=l s=l 1

W) ;;* then cJ and c, are determined by solving the following equations:

a+, 1) ac, =O, j=l,2, . . . . m

or

ae(c, I(, u) k

=o, r=l,2 . . . . . m, and s= 1, 2, . . . . n.

(3a-l

(3b)

The subsequent phase of the approximation procedure can be stated as, given the control points and an initial approximation for 1, or ( ui. u,), computing a new set t* or (~7, u,*) such that the new approximation to the parameters result in a reduced value of e( c, t) or e( c, U, u). This process is caIled parameter optimization.

In this article, a parameter optimization scheme is proposed wherein an explicit expression for the sum e is obtained in terms of the basis functions, assigned knot sequence and initial parameters. The error expression is derived in Section 3 using cubic B-spline basis functions. This sum is then minimized using Levenberg-Marqurdt’s non-linear least square optimization technique, with the parameter values at each point as variables. The optimization procedure has been mathematically explored in Section 4. Unlike the methods described in the literature (Section 2), least-square fitting of curve or surface is performed only once, after the parameters are optimized, instead of repetitive fitting. Thus the iterations involved in the described method are numerical rather than ‘geometric’. The optimization process has been studied with respect to computational efficiency, sensitivity of error magnitude with respect to initial parameter assignment, assigned knot sequence and the number of spline segments in Sections 5 and 6. This method has also been compared with a number of published methods [Hoschek ‘88, Hoschek et al. ‘89, and Rogers & Fo g ‘891 in terms of computation time and decrement of error value for a specified number of iterations to explore the computational advantage of numerical

Page 3: Parameter optimization in approximating curves and surfaces to measurement data

B. Sarkar. C.-H. Menq / Parameter opttmi:otlon 269

iterations over the geometric iterations and recursive fitting. Finally in Section 7, examples are provided for the approximation of curve and surface offsets.

2. Some published methods

An iterative curve fitting procedure for two-dimensional data points is described in [Gross-

man ‘701. The function that is minimized is:

sea,, a,,, u) = c i w, I x, - c y: I + WV, Y; - c a,$

i=l ‘1 r=O 1 L r=O Ii

where x,, y, are the data points, w,, and w.,., are the weight functions, and u, are the assigned parameter values. A constant step-size search is adopted for parameter optimization. The

iteration for the parameter is carried out starting with a step size of (u,+, - u,_,)/20 and decreasing the step size to until about 1,000 of the original value. In the conclusion of this

paper questions are raised regarding the convergence of the error value to a global minimum. Some numerical methods ensure a global minimum provided the problem is set up correctly so

that it converges in the first place. Levenberg-Marquardt’s technique of non-linear least-square minimization used for parameter optimization in this article ensures a global minimum.

[Pratt ‘851 describes algorithms for curve and surface approximations. In the curve ap- proximation, the distances 1 r( u,“) - ‘J 1, j = 1, 2, . . . , m, for the k th iteration are computed,

k+’ and for each point a new parameter value u, is found so that the corresponding residual is made smaller in magnitude. But the method of calculating the new parameter values is not

mentioned. However, in this method, changing u, values changes the least-square equations and hence the curve has to be recomputed at each iteration of the approximation procedure. For surface approximation, the new parameter values are found by solving two non-linear

equations:

[?,4U,? u,)] .c(u,, u,) =o, [‘;,-‘(U’. u,,] -c(u,, 0,) =o.

These non-linear equations are solved for ui and u, and a few iterations can yield satisfactory reduction in e. The surface is refitted after every iteration of the optimization

procedure. Pratt also raises a few interesting questions, one of them being whether the resultant surface is the same for different initial parameter assignments. We have tried to investigate this point in Section 4 of this article. Some results for curve approximation with different initial parameter values are shown, but a direct mathematical proof is not brought forth.

[Hoschek ‘881 describes intrinsic parameter optimization using a Newton-like approach. The basic idea behind his method is to change the parameter values in such a way that the error vector becomes normal to the fitted surface. The change in parameter values are calculated as:

for curve At,=[C(t;)-41. ,& .e, I

for surface Su(u,* 0,)

4 = [Sh u,> -pl,] . Isu(u b-a

. - 11 q)l p ’

s”(u,* 0,) Au,=[G. r)-&,I. Is,(u_ u,)l -e

IT

Page 4: Parameter optimization in approximating curves and surfaces to measurement data

270 B. Surk-ar. C.-H. Mrnq / Purameter oprrmcarion

where t E I, I = [a, 61 and p is the length of the polygon spanned by the given points P, in the case of curve. For the surface case u E [a, b], L’ E [c, d], p is the approximative length of the parameter line U, = constant and Y is the approximative length of the parameter line u, =

constant. This method has the problem of overshootin g the foot of the perpendicular from the data

point P, or e, to the approximation curve C(f) or surface S( U. c). In that case Hoschek

suggests that the change in parameter values be halved. Later Hoschek published another method for quicker convergence [Hoschek et al. ‘891. In this method a Newton-like correction

formula for the parameters are obtained. For curves the fth parameter correction is given by:

( p, - c( 11’“)) . c,( 1;“)

AfY’= (P:-C(rj”))~C,,(p)-[C,(ry]2’ Hoschek’s methods have been compared with our method for curve and surface examples given in Sections 5 and 6.

Most recently [Rogers & Fog ‘891 describes parameter optimization using first-order Taylor series expansion of the curve or surface in the vicinity of the measurement point. The

parameter correction for the curve case is given by:

Ar, = (P,-w~~I _

I-,,

ac 2 1-11 at ,=,, Some examples of constrained curve and surface fitting applicable to the design of ship hulls are provided in this paper. This me&od has also been compared with the method presented. It turns out that the above method is equivalent to Hoschek’s older method [Hoschek ‘881.

The optimization method described here, takes a different approach altogether. An explicit

error expression is formulated which becomes the objective function for the least-squares minimization problem. The next section is devoted towards a matrix formulation of the error

expression e(c, r) and e(c, U, u) mentioned in equations (2a) and (Zb).

3. Explicit error expression

The formulation of the error expression requires the mathematical background of least-square fitting of cubic B-spIines described in [Hayes & Hailiday ‘741. For curves we select h internal

knots h,, X2, . . . , X,,O<X;<l, i=l,2, . . . . h and then the knot set is augmented with eight

additional knots as shown in Fig. 1. It is assumed in the following analysis that parameters are assigned to the data points ranging from 0 to 1. These otherwise arbitrary knots must satisfy:

x_, GA-2 <A_, < h, < 0, (4a)

l<X h+l ~X,+,~Ah+,~X,+,. (4b)

Here h, and Ah+, are the boundary knots. With this augmented set of knots we can define (h + 4) 4th-order B-splines of equation (la). The nth-order B-spline M,.i(t) can be evaluated by the recurrence relation [Cox ‘721:

X,.,(f) = (’ -X,-,)M,-,.i~I(I~+(~;-f)~“-,,,(f) ,

I I n (5a)

M (t) = {1/h-L,) when A,-, <t<L I.1

0 otherwise. (5b)

Page 5: Parameter optimization in approximating curves and surfaces to measurement data

B. Surkar, C. -H. .Cfenq / Parameter optrmcatron

x h+l

number of internal knots = h number of spline segments = h+l number of control points = h+4 number of B-spline Al;(t) = h+4

index i for )\ varies from -3 to h+4

Fig. 1. Selected knots between 0 and I and augmented set of knots

If X,_, < r < A,, then the non-zero elements to be computed for cubic B-splines are M,,,,

M ?.I’ M3.,, M3.,+,, IW~,,+~, M4.,. M.,,+,. M4.i+z, M4,,+3. Starting with the M,,,, which is calculated using equation (5b), and applying the recurrence relation in equation (5a), all cubic B-spline basis functions can be computed. The problem then reduces to determining the control

points ci or c,, in equations (la) and (lb) respectively. The observation equations for the least-squares solution are:

hc4

c c,M,(t,) = P, _-_ (6a) i=l

where r= 1, 2, . . . . m. Equation (6a) can be written in matrix form as:

[Tl[cl = [PI (6b) where [T] is a matrix with m rows and (h + 4) columns containin g the B-spline basis functions, and [c] and [P] are matrices with (h + 4) X 3 and m X 3 elements respectively. Matrix [P]

contains the coordinates of the data points whereas [c] contains the unknown coordinates of the control points. The solution of equation (6b) is obtained by finding the pseudo-inverse as:

[cl = [[~lT[~l] -‘mT[pl. (7)

Although this solution is computationally efficient, a much more stable solution can be

obtained by Householder reductions, exploiting the band structure of the matrix [T]. In the case of surface fitting a similar treatment is done by assuming a rectangular

parametric region ranging [O,l] in the u-direction and [O,l] in the u-direction. The rectangle is subdivided into smaller regions by selecting h internal knots in u-direction h,, i = 1, 2, . . . , h and k internal knots in u-direction 8,. j = 1, 2, . . _, k. These knot sets are augmented by sixteen arbitrary knot sets satisfying relations similar to equations (4a) and (4b). The general bicubic spline surface is represented in the form of equation (lb), where B-splines M,(u) are

based on the knots X, and N,(u) are based on the splines 8,. Again the observation equations become similar to equation (6a):

h+4 kt4

c c c,,Mb+,b,) =f’, i=l /=I

(sa>

where r = 1, 2, . . . , m x n. Equation (Sa) can be written in matrix form as:

[Tl[cl = [PI (8b)

Page 6: Parameter optimization in approximating curves and surfaces to measurement data

272 B. Sarkor, C.-H. Menq / Purameter optrmrxtion

Here [T] is a matrix with m X n rows and (h + 4) X (k + 4) columns containing the products of the basis functions. [c] is a [(h + 4) X (k + 4)] X 3 matrix containing the unknown coordi-

nates of the control vertices and [P] is a [M x n] x 3 matrix containing the coordinates of the data points. The solution of equation (Sb) is identical to equation (7), although the matrices

with the same notations are different for the curves than those for the surfaces. The error vectors at each point are obtained in the matrix form:

bl= PI - Pl[PITml -‘[PI = [VI - Irl[[~lT[~ll-‘+v = [RI[Pl (9)

where [R] = [[I] - [T][[T]T[7’]]-‘[T]T] is an orthogonal matrix. The matrix [e] is a w x 3 matrix, w is the number of measurement data points, i.e., w = m for curves and w = m X n for surfaces. An element in the rth row and 2nd column denotes the value of the y-component of the error vector at the r th data point. [R] is an w X w matrix, and since the elements of matrix [T] are functions of the parameter values at the data points, assuming a fixed knot sequence,

the elements of [R] are also functions of the parameters alone. Equation (9) can be written in

component form as:

[e,] = [R][P,] (LO)

where [e,] is a vector of length w having the x-components of error vectors as its elements and

[P,~] is another vector of length w having the x-coordinates of the data points as its elements. The y- and z-components of the error can be written in a similar form as that of equation (10). The sum of the squares of the x-component of error vectors is given by:

i e.:,= [e,~lTEe,l = i~-~-T[Rl~[Jfl[~,~l = [P,I~~RI[P,I~ (11) i=l

Here [ RIT[ R] = [R] since [R] is an orthogonal matrix. Similar expressions for the sum of squares of y- and z-components of the error vectors can be obtained. The expression for the

squares of all the error values becomes:

E= i e,* = fj (ej, + e,:, + ef,). (12) i=l i=l

Thus, E = E( u,, u,) for a surface and E = E(t,) for a curve when i, j, k = 1, 2, . _ , w, if the knot positions are assumed to be fixed. In the case, where the knots are not fixed. the error

expressions are functions of knot positions as well as parameter values, i.e., E = E( u,, c,, A,, 8,) for a surface and E = E( t,, Xp) for a curve when p = 1, 2, . . . , h + 4, and I = 1, 2, . . . , k + 4. In Section 5, a dynamic knot allocation example has been provided, where the knot positions are also optimized along with the parameter values. The average error is defined by:

e, = [ 1 ,r; e’,w I’*. (13)

The quantity e, is crucial in approximation procedures, as it provides an indication of how close the data points are from the corresponding fitted points. This variation of e, with the number of iterations has been studied extensively in Sections 5 and 6.

4. Optimization procedure

A modified Levenberg-Marquardt method and an active set strategy [Marquardt ‘631, [Gill& Murray ‘761 is used to solve the parameter optimization problem. This method is suitable

Page 7: Parameter optimization in approximating curves and surfaces to measurement data

B. Sarkar. C. -H. ,Mmq / Purameter opttmcatton 273

for solving non-linear least-squares minimization problems subject to simple bounds on the variables. A general least-squares minimization problem can be stated as follows:

(14)

subject to I < x < u

where m > n, F: R” -+ R”, and l(x) is the ith component of the function F(x). Given a

starting point, an active set is created. The active set contains the indices of the variables at

their bounds. If a variable is not in the active set, it is called a free variable. In this method a search direction for a free variable is computed using the formula

d= -(JTJ+pI)-‘JTF (15)

where p is the Levenberg-Marquardt parameter, F = F(x) and J is the Jacobian with respect to the free variables. The search direction for the variables in the active set are set to zero. Finally the optimality conditions are checked, these conditions being a tolerance on the

gradient. These conditions are:

(Ilg(x,)I/=r* i,<x,<u,,

I

g(x,> co, x,=u,, (16)

g(x,> ’ 0, x, = 1,.

In equation (16) e is the user input gradient tolerance. The solution attained by this method is a global optimum. In the present problem_ the total error expression E obtained in equation

(12) becomes the function F(x) in equation (14). The component functions f,(x) are the error components at w data points, namely, e,,, e_“,, el,, i = 1, 2, . . . , w. The variables x in this case

are the parameters tk or (u,, u,), i, j, k = 1, 2, . . . , w, assuming the knot positions are fixed.

The lower bounds on the parameters are 0 and the upper bounds are 1. It is possible to constrain the parameter values at some of the points by simply putting both the upper and

lower bounds equal to the desired parameter value. Also it is possible to constrain the control points similar to the work of [Rogers & Fog ‘891. However, in this article only unconstrained minimization has been studied. The next few sections provide various examples of the

approximation procedure.

5. Curve examples

In this section the curve approximation algorithm is tested mainly from the point of view of computational efficiency. The curve to be approximated was originally designed in CATIA (Dassault Systems) and 20 points on this curve were selected as the data points for the curve fitting and optimization algorithm. These points along with the design curve are shown in Fig. 2.

Table 1 shows the results of parameter optimization for different numbers of cubic B-spline segments with evenly placed knots (in the parametric space). This table shows the average individual error values e, before and after optimization and the corresponding CPU time for a fixed number of iterations. The CPU time is mentioned here along with the number of iterations because of the fact that, as the number of spline segments and consequently the number of control points increases, the CPU time increases for the same number of iterations, because of increase in the number of arithmetic operations. The number of control points (h + 4) is equal to the number of segments plus 3 ((h + 1) + 3, h being the number of internal

Page 8: Parameter optimization in approximating curves and surfaces to measurement data

274 B. Surkar. C. -H. Mrnq / Parameter optimrxtron

}-f 1omm

Fig. 2. Design curve with 20 data points

knots shown in Fig. 1). Fig. 3 shows the trend of the decreasing average error values with the number of iterations for the cases mentioned in Table 1. It was seen that in all the cases a few iterations, namely 5 or less, can yield a considerable reduction in average error.

Table 2 shows similar information as that of Table 1 for the case where a tolerance value of 2.5e-3 mm is prescribed in the optimization procedure. It is evident from this table that the number of iterations required to achieve a particular tolerance level decreases as the number of control points increases, because in the case of more control points, e, is smaller to begin with.

Table 1

Results of optimization for a B-spline curve with evenly placed knots (20 data points of Fig. 2; number of iterations = 50; error values in mm; CPU time for VAX 8550)

Number of Average error e, spline segments before optimization

6 0.600

8 0.388

10 0.158

12 0.074

14 0.020

Average error e, CPU time in

after optimization seconds

9.42e-3 49.51

1.38e-3 49.83

3.98e-4 55.07

1.20.~4 64.12

5.92e-5 70.81

Page 9: Parameter optimization in approximating curves and surfaces to measurement data

B. Surkur, C.-H. Menq / Purametrr optlmi:ation

0.60

0.50

0.40

- 6 segments

- 10 segments - 12 segments

- 14 segments

0.00 0 2 4 8 6

number of iterations

275

Fig. 3. Average error e, versus number of iterations for 6, 8. 10, 12, and 14 B-spline segments: number of

iterations = 10: 20 data points; errors in mm.

A comparison of our method with Hoschek’s methods [Hoschek ‘88, Hoschek et al. ‘891 of parameter optimization along with the method used by Rogers and Fog [Rogers & Fog ‘891 is illustrated in Fig. 4 for the case of 8 B-spline segments or 11 control points. The knots are

evenly spaced in the parametric space. After 10 iterations our method reduces the average error e, from 0.390 mm to 4.6e-3 mm in 9.98 seconds whereas the error reduces to 0.086 mm in 0.69 seconds from the same initial value and after same number of iterations by Hoschek’s old

method [Hoschek ‘881. Hoschek’s new approach [Hoschek et al. ‘891 yields an error value of 0.042 mm in 0.89 seconds. The average error on the other hand reduces to 0.087 mm by

Rogers & Fog’s method in 0.69 seconds which is almost identical to that obtained by Hoschek’s old approach. Thus, although the reduction in error per iteration by other methods is lower than our method, the CPU time consumed per iteration is much higher in our method. A better comparison would be to identify the error reductions for the same amount of CPU time irrespective of the number of iterations.

Table 2

Results of optimization for a B-spline curve with evenly packed knots (20 data points of Fig. 2; requested error

tolerance = 2SOe-3 mm; CPU time for VAX 8550)

Number of Average error e, Number of CPU time spline segments after optimization iterations in seconds

6 2.53e-3 61 62.57 8 2.54e-5 23 24.51

10 2.482-3 21 21.24 12 9.93e-4 3 3.88 14 2.27e-3 2 3.19

Page 10: Parameter optimization in approximating curves and surfaces to measurement data

276 B. Sarkar. C.-H. Menq / Parameter optrmcation

0.40

0.35

0.30

0.25

0.20

- our method

7 Hoschek ‘88 - Roger & Fog ‘89 - Hoschek ‘89

0.00 0 2 4 6 8

number of iterations

Fig. 4. Average error e, versus number of iterations for 8 B-spline segments by our method and Hoschek’s methods

and method suggested by Rogers & Fog; number of iterations = 10; 20 data points; errors in mm.

It was shown in Table 3 that the-average error, for the case of 8 spline segments with even knot placement, reduces to 1.27e-3 mm in 50 iterations in 49.83 seconds. Fig. 5 shows the results of Hoschek’s method [Hoschek ‘881 for the same case up to 1000 iterations. In 49.86

0.4 80

average error by Hoschek ‘88

-----t CPU time in seconds

number of iterations

Fig. 5. CPU time and’average error versus number of iterations by [Hoschek ‘88j; number of iterations = 1000; errors in mm; CPU time in seconds; 8 B-spline segments; 20 data points.

Page 11: Parameter optimization in approximating curves and surfaces to measurement data

t?. Sarkar, C.-H. Menq / Paramerer optimumon 277

(4

Fig. 6. (a) B-spline curve fit after parameter optimization and knot positions; 8 segments; 20 data points: even placement of knots. (b) B-spline curve fit after parameter optimization and knot positions; 8 segments; 20 data points;

uneven knot placement at O.O,O.O.O.O, 0.0.0.15, 0.35. 0.45, 0.65, 0.75, 0.85. 0.95, 1.0, 1.0, 1.0, 1.0.

seconds an error value of 0.024 mm was attained in 700 iterations and in 1000 iterations the error value was 0.023 mm in 71.58 seconds. Thus, for the same amount of CPU usage, our

method produced a lower e, value. Fig. 6a shows the curve fitted to the 20 data points with 8 B-spline segments. Fig. 6b shows

the curve fitted to the same data points for an uneven placement of knots. The knots are placed at the parameter values of 0.0, 0.0, 0.0, 0.0, 0.15, 0.35, 0.45, 0.65, 0.75, 0.85, 0.95, 1.0, 1.0, 1.0, and 1.0. The results of parameter optimization for this case by our method and Hoschek’s method are shown in Figs. 7 and 8. It can be seen in Fig. 7 that by our method, e, decreases from 0.31 mm to 4.0e-3 mm in 10 iterations and 11.9 seconds. Hoschek’s method [Hoschek’88], on the other hand, reduces e, to 0.05 mm in the same amount of CPU time and in about 160 iterations (intercept on the horizontal axis corresponding to 11.9 seconds in Fig. 8). Again the nature of average error variation with the number of iterations is almost identical for Hoschek’s

Page 12: Parameter optimization in approximating curves and surfaces to measurement data

278 B. Sarkar. C.-H. Menq / Parameter optimixnion

0.05

- Hoschek ‘88

- Roger & Fog ‘89

- Hoschek ‘89

0 2 4 6 8 10 0.00

number of iterations

Fig. 7. Average error e, versus number of iterations for 8 B-spline segments by our method, Hoschek’s methods and

Rogers & Fog’s method; number of iterations = 10; 20 data points; errors in mm; knots unevenly placed.

0.35

0.30 60

0.25

G z

B 0.20 40 k:

m t e, .c

$ 0.15 2

z ‘3

ZJ 3

& 0.10 20

0.05

-cl

0.00 I I I I I- 0

0 200 400 600 800 1000

number of iterations

Fig. 8. Average error and CPU time versus number of iterations by [Hoschek ‘881 for 8 B-spline segments and unevenly placed knots; errors in mm; CPU time in seconds; 20 data points.

Page 13: Parameter optimization in approximating curves and surfaces to measurement data

B. Sarkar, C. -H. Menq / Purameter optimrxtton 279

old approach and Rogers & Fog’s method. Hoschek’s new approach, however, reduces the error

value to 0.045 mm after 10 iterations. thus showing a faster velocity of convergence compared

to the older method. It should be noted that the change in the knot placement has reduced e, before optimiza-

tion from 0.39 mm to 0.31 mm. Therefore, the new knot set is a better selection for the given

data points. Knots are selected based on the number of data points and geometric considera- tions like curvature variation, inflection points etc. In this example, the uneven placement of knots describes the curvature variation better than the evenly placed knots.

Next the effect of different initial parameter assignments for the case of 8 evenly placed knots is investigated. Two different schemes were used to generate two sets of parameters. The first one was the chord-length method and the other one was equal division parametrization between 0 and 1. The optimization scheme converged to e, = 1.4e-3 mm (according to the optimality criteria in equation (16)) from e, = 0.39 mm after 87 iterations in 82 seconds in the

first case, and in the second case from e, = 0.13 mm to e, = 5.7e-3 mm after 87 iterations and

converged to e, = 3.4e-3 mm after 156 iterations in 203 seconds. The final curves were close

geometrical approximations to the initial one but different in the two cases. One should note that the e, values after optimization should be the same for two final curves to be identical.

Two points should be noted at this juncture. Point one is, since the knot positions are fixed, assignment of different parameter values to the data points initially might change the func-

tional value of B-spline bases at these points, due to the change in the left knot index. In one parameter assignment it may be that A, < l, < A,, , for the jth point, whereas, in the other case t, might satisfy A, < t, < hk+,, where k f i. This situation would obviously lead to two

different final curves. The second important point is that, the optimization scheme should be allowed to run for a sufficient number -of -iterations, so that the convergence is achieved according to equation (16). Different parameter assignments clearly change the number of iterations and consequently the CPU usage.

Table 3

Parameters and knot positions before and after optimization (20 data points; 8 B-spline segments; dynamic knot

placement; initial parameters by chord-length method)

Parameters Parameters

before optimization after optimization

0.0 0.0

0.054 0.063

0.0992 0.097

0.137 0.133

0.172 0.170

0.209 0.209

0.249 0.250

0.293 0.294

0.341 0.342

0.392 0.394

0.455 0.457

0.529 0.531

0.599 0.599

0.664 0.659 0.718 0.712

0.763 0.760

0.802 0.805

0.846 0.849

0.910 0.892

1.0 1.0

Knots Knots

before optimization after optimization

0.0 0.0

0.0 0.0

0.0 0.0

0.0 0.0

0.125 0.079

0.25 0.257

0.375 0.355

0.5 0.517

0.625 0.653

0.75 0.751

0.875 0.851

1.0 1.0

1.0 1.0

1.0 1.0 1.0 1.0

Page 14: Parameter optimization in approximating curves and surfaces to measurement data

280 B. Sarkur, C.-H. Menq / Parameter optrmcatton

static knots - dynamic knots

0 2 4 6

number of iterations

8 10

Fig. 9. Average error versus number of iterations by our method for the cases of static and dynamic knot placements: 8 B-spline segments; 20 data points; errors in mm.

In the case of a single spline segment or no internal knots, however, the optimization process becomes invariant with respect to initial parameter assignments. The same set of parameter

values are achieved after optimization provided an adequate number of iterations is allowed. For a single segment after optimization e, was 2.05 mm in both the chord-length method and equal division parametrization, starting e, values were 3.87 and 4.88 mms respectively.

Finally in this section, the dynamic knot placement is studied, i.e., optimizing the positions of the knots along with the parameter values assigned to the data points. In this case, the components of knot position vector [hi], i = 1, 2, . .., h + 4, and parameter vector [u,],

i= 1, 2, . . . . w, are the variables that are solved for using the error function e(c, t, X). Table 3 shows the parameters and knot positions before and after the optimization process for the case of 8 B-spline segments after 10 iterations. The knots are evenly spaced at the start of the optimization procedure.

Fig. 9 compares the optimization process for the static and the dynamic knot placements. The number of spline segments is kept constant, namely 8, in both the cases. The static knots are also evenly placed as shown in Fig. 6a. For the static case, e, reduces from 0.39 mm to

6.le-3 mm in 9.98 seconds, whereas, in the dynamic situation, e, reduces to 9.9e-3 mm in 25.3 seconds starting from the same initial value of e, and after the same number of iterations. These results are perceivable, since in the dynamic situation, the number of variables increases, consequently increasing the CPU usage for the same amount of error reduction. In 9.98 seconds the error is reduced to 0.05 mm in the dynamic case.

Fig. 10 shows a curve created by fitting 10 segments of B-spline to 60 points obtained on the contour of a connecting rod CAD model in CATIA originally designed with 17 arcs. The points on the contour of the connecting rod are very unevenly spaced as shown. The algorithm for curve approximation is quite versatile and worked well in this case. The average error before optimization was 0.033 mm which was reduced to a value of 0.018 mm in 10 iterations.

Page 15: Parameter optimization in approximating curves and surfaces to measurement data

il. Sarkar, C.-H. Menq / Pnramerer opwncxmon

t---l 25mm

Fig. 10. B-spline curve fit to connecting rod contour with 30 segments: 60 data points; 9 knots evenly spaced in

parametric space.

In all the examples stated until this point, significant amount of error reduction occurs in the first few iterations, specially in the second iteration step. The optimization process can be

stopped after reaching a tolerance goal stipulated by design goals as depicted by Table 2.

6. Surface examples

The data for the first surface fitting example was obtained by scanning an wax model of a surface patch designed in CATIA and milled in a Cincinnati Milacron T-10 machining center.

The scanning was performed on a Sheffield Cordax universal coordinate measuring machine. The data, shown in Fig. 11, consists of 100 points, 10 data points on each of the 10 section

curves. These points were parametrized initially by the chord-length method and optimized by the method discussed in Section 3.

Table 4 shows the results of optimization for various numbers of surface patches in the u and u parametric directions of a B-spline surface with evenly spaced knots. The average error values are plotted in Fig. 12, against the number of iterations in the optimization process. ft is evident from this figure that only a few iterations, namely 4, can produce a significant reduction in the value of e,. It is also observed that there are several ways to design a surface for a prescribed tolerance. For example, if the error tolerance is taken as 0.125 mm, then the number of iterations required for the optimization process decreases as the number of patches increases, namely, 4 iterations are required for the single patch case, 3 for the 2 x 2 and 2 x 3 patches, and 1 for the 3 X 4 and 4 X 5 cases. The CPU time on the other hand, increases with the number of iterations for a particular number of patches as shown in Fig. 13. The CPU usage also increases with the increase in number of patches for a given number of iterations. For the current example of 0.125 mm tolerance, one might be interested in finding the combination of the number of patches which takes minimum CPU time; this can be found out

Page 16: Parameter optimization in approximating curves and surfaces to measurement data

282 B. Sarkar. C. -H. Menq / Puramerer oprrm~rorron

l-l 25tnm

Fig. 11. The surface data points

from Fig. 13. It can be seen that 1 iteration of 3 X 4 patches takes the minimum amount of CPU time, about 455 seconds, as compared to 4 iterations of the single patch (851 seconds) or 3 iterations of the 2 X 2 (708 seconds) and 2 X 3 (873 seconds) patches, or even for the 1 iteration

of the 4 X 5 case (696 seconds). -Thus it is possible to approximate a surface with different number of patches to attain a particular error tolerance. Amongst the various combinations, a

particular number of patches can be selected, based on the criterion of minimum computation time (3 x 4 patches) or geometric simplicity (single patch). the later might reduce computation in such calculations as surface intersections, subdivision etc.

Fig. 14 shows a comparison of the Hoschek’s method [Hoschek ‘881 with our method. The

average error decreases from 1.42 mm to 0.71 mm for the single patch case in 10 iterations as compared to 0.1 mm achieved by our method, but the CPU time in Hoschek’s method is 19.09

seconds compared to 383.6 seconds for the same number of iterations by our method. Similarly for the case of 3 x 4 patches, in 10 iterations, the average error e, decreases from 0.2 mm to 0.07 mm in 55.6 seconds by Hoschek’s method as compared to 0.01 mm attained by our method in 4493 seconds. Thus for the same number of iterations, the decrease in the value of

@Ill is much greater in our method but the CPU time is much higher. A better comparison of the two methods is the e, values after a specified CPU usage.

Shown in Fig. 15a and 15b are the e, and CPU time for 1000 iterations by Hoschek’s older

Table 4

Results of optimization for a B-spline surface with evenly packed knots (100 data points of fig. 10; number of iterations = 10, error values in mm; CPU time for VAX 8550)

Number of patches Average error e, in u and u directions before optimization

Average error e, after optimization

CPU time in seconds

1x1 1.412 0.110 1.79e+ 3

2x2 0.665 0.031 2.56e + 3

2x3 0.647 0.030 3.08e + 3

3x4 0.208 0.014 4.49e + 3

4x5 0.170 4.52e-3 6.96e f 3

Page 17: Parameter optimization in approximating curves and surfaces to measurement data

B. Sarknr, C.-H. Menq / Parameter opttmtxtron

1.50

1.25 - 2x2 patches - 2x3 patches

1 .oo - 3x4 patches - 4x5 patches

k g i 0.75 z ; > z

0.50

0.25

0.00 0 2 4 6 8 10

283

number of iterations Fig. 12. Average error e, versus number of iterations for different numbers of surface patches; number of

iterations = 10. 100 data points: errors in mm.

method for the single patch and 3 x 4 patches case. In the case of the single patch, the error tolerance of 0.125 mm is attained by Hoschek’s method after 647 iterations in 1234 seconds as compared to 4 iterations in 851 seconds by our method. Also after 10 iterations and 1790

6000

4000

- 2x2 patches - 2x3 patches - 3x4 patches - 4x5 patches

2000

0

0 2 4 6 8 10

number of iterations Fig. 13. CPU time versus number of iterations for different numbers of surface patches: number of iterations = 10: 100

data points: CPU time in seconds.

Page 18: Parameter optimization in approximating curves and surfaces to measurement data

284

Ix1 patch our method ----t- 1x1 patch Hoschek ‘88 - 3x4 patches our method -O- 3x4 patches Hoschek ‘88

0.25

0.00

0 2 4 6 8 IO

number of iterations

Fig. 14. Average error versus number of iterations for single patch and 3 X4 patches by our method and [Hoschek ‘881; number of iterations = 10; error in mm; 100 data points.

seconds our method produces an error value of 0.1 mm as compared to the error value of 0.11

mm obtained in the same amount of time by Hoschek’s method after 937 iterations. Similarly in the case of 3 x 4 patches, after 4493 seconds of CPU time our method achieves an error value of 0.013 mm after 10 iterations whereas by using Hoschek’s method, the error tolerance obtained in the same amount of time was 0.019 mm in 815 iterations. The prescribed error tolerance of 0.125 mm, however, was achieved much more quickly by Hoschek’s method

namely, after 3 iterations and 17 seconds, because of the error value to begin with was 0.17 mm. Fig. 16a shows the polygon of control points for the case of 3 X 4 patches. Fig. 16b shows

the perspective view of the B-sphne surface patch fitted to the data points with 3 patches in u-direction and 4 patches in u-direction. The surface is shown here as a dense net of orthogonal parametric lines. Fig. 17 shows another example in which a surface is approximated to 120

points (15 x 8) on a turbine blade die surface. The surface consisted of 30 x 11 patches in the CATIA model based on which it was NC machined. Here it was modelled using 8 X 4 patches in the tl and u parametric directions respectively. The average error reduced from 0.04 mm to 0.01 mm (the specified tolerance in the design) in 5 iterations and consuming 12800 seconds of

CPU time. Thus sacrificing the computation time in the approximation process may lead towards a simpler surface geometry, namely, fewer number of patches.

7. Offset approximation

Offset curves and surfaces have a number of applications in computer aided design and manufacturing. In solid modelling, for example, they are used for describing the tolerance zone or in a situation where the surface description of, say, the inner surface of a sheet metal stamped part is to be generated from the outer surface. In numerical control machining, the cutter path of a ball-end cutter lies on an offset of the surface one needs to machine.

Page 19: Parameter optimization in approximating curves and surfaces to measurement data

B. Surkar. C.-H. .Menq / Parameter optrmcation

(a)

1.50

1.25

1 .oo

0.50

0.25

0.00

0.25

0.20

2 0.15

5 U 10 E

2 0.10

0.05

-l 2000

single patch Hoschek ‘88 - CPU usage for single patch - 1750

-1500

number of iterations

3x4 patches Hoschek ‘88

- CPU usage by Hoschek ‘88

(W (b) 0.00 1 1 I I

6000

5000

4000 % z i) E

3000 .E: E ._ 2

2000 e

1000

0 0 200 400 600 800 1000

number of iterations

Fig. 15. (a) Average error and CPU time versus number of iterations for single B-spline patch by [Hoschek ‘88]:

number of iterations = loo0, error in mm; CPU time in seconds; 100 data points. (b) Average error and CPU time

versus number of iterations for 3 ~4 B-spline patches by (Hoschek ‘831; number of iterations = 1000; error in mm; CPU time in seconds; 100 data points.

Most of the work that has been published on offset techniques deals with the generation of offset curves in two dimensions, e.g. [Tiller & Hanson ‘831, [Klass ‘831, [Hoschek ‘851, [Pham

‘881. Very little work has been published which deals with offsetting of three-dimensional

Page 20: Parameter optimization in approximating curves and surfaces to measurement data

286 B. Sarknr. C.-H. Menq / Parameter optrmkotion

Fig. 16. (a) Control polygon for 3 x 4 patches. (b) Dense parametric surface fit after parameter optimization with 3 X 4

B-spline patches; 100 data points.

profiles and surfaces. [Coquillart ‘871 describes an offset technique for nonuniform rational B-splines. The control points of the progenitor curve are offset in the direction of the normal vector, at a point on the progenitor closest to the corresponding control point, to yield the new control points for the offset curve. An approximation of piecewise parametric surfaces is described in [Farouki ‘861. In this method the parametric domain of each patch is subdivided into smaller sub-domains and bicubic approximation to the offset for each of these sub-do- mains is computed. A tolerance analysis on the approximating offset surface is also done to assess the accuracy. [Chen & Ravani ‘871 published a technique to construct offset surfaces. They also provided an algorithm to detect and remove the closed loop of self-intersection on the offset surface. The degeneracy of a profile for surface offset, when the offset distance

Page 21: Parameter optimization in approximating curves and surfaces to measurement data

B. Sorkar. C.-H. Menq / Parameter optimization 287

H lomm

Fig. 17. Bicubic B-spline surface fit to of a turbine blade die surface: 120 points; 8 x4 patches.

exceeds a critical value related to the radius of curvature for a profile or primary radii of curvature for a surface, has been discussed in great detail in [Farouki ‘861.

In this article, offsets are generated following the same approach as is described in

[Chen & Ravani ‘871. Offset curves and. surfaces are approximated by fitting a number of points which are equidistant from the progenitors and lie on the corresponding normal vectors

of the progenitors. That is, given a curve r(t) or a surface s( U, u), the following procedure is adopted for offset approximation.

(a) Select m data points on the progenitor. The selection of the points depends on the geometric considerations, thus, one might select more points in the regions where there is a large variation in curvature. The selected points on the progenitor are: q = r(ti) and s, = s(u,,u,)wherei=l,2, . . . . m, j=l,2 ,..., n,andk=l,2, . . . . I, nXl=m.

(b) Calculate the normal vectors at these m points. For curves calculate the tangent vectors

and the binormal vectors

i( 2;) x i’( t;)

and then the principal normal vectors

n==Txb. I I I

For surfaces the normal vectors are calculated as

Page 22: Parameter optimization in approximating curves and surfaces to measurement data

‘88 B. Sorkar. C.-H. Menq / Parameter oprlmi:atmn

Fig. 18. Offset curve (dashed line) and the progenitor (solid line): offset curve fit for 8 B-spline segments; 20 data

points; offset distance = 6.4 mm.

(c) Calculate m points on the theoretical offset from the progenitor points.

for curves co = ‘I + d. ny;

for surfaces S,.L o = s J.h

+ d. II~.~.

(d) Apply least-square fitting and parameter optimization procedure, described in Section 3, to these m points for offset curve or surface approximation.

In the remainder of this section, we will provide some examples of the offset approximation procedure discussed above. Fig. 18 shows the three-dimensional offset curve approximated to 20 points calculated using the above procedure by 8 B-spline segments; the progenitor curve being the design curve shown in Fig. 3 and the offset distance was equal to 6.4 mm. The

average error of approximation e, in this case was 0.16 mm before optimization. After 50

iterations and 63.09 seconds e, was equal to 0.03 mm. The surface offset approximation is illustrated in Figs. 19a and 19b. The offset in this case is

approximated from 100 points and with 3 X 4 patches in the u and u parametric directions respectively. The progenitor surface is represented by dotted parametric curves. The offset surfaces are shown in bold lines. The offset distances were 6.4 mm and 12.7 mm in Figs. 19a and 19b respectively. The approximation tolerance used was 0.025 mm.

Degeneracies are introduced at higher values of offset distances. These degeneracies occur mainly at the concave regions of the curves or surfaces when the offset distance exceeds the critical value [Farouki ‘861. The authors have developed an algorithm for detection and elimination of degeneracies for two-dimensional curves and are currently working on surface degeneracies, which will be addressed in a later paper.

8. Conclusions and future work

An algorithm for parameter optimization has been developed, which can be applied for full curve or surface approximation. Parameters are optimized by solving a least-squares minimiza-

Page 23: Parameter optimization in approximating curves and surfaces to measurement data

B. Sarkur. C.-H. Menq / Parameter oprwnr:ar~on

(4

Fig. 19. (a) Offset surface fit to 100 points with 3 ~4 B-spline patches; offset distance = 6.4 mm. (b) Offset surface fit

to 100 points with 3 x4 B-spline patches; offset distance = 12.7 mm.

tion problem using Levenberg-Marquardt’s method with the sum of the squared norms of the error vectors at the data points as the objective function. The results indicate that the method is computationally efficient and the minimization scheme ensures a global minimum. A pre- liminary study shows that the final curve or surface is invariant with respect to the initial parameter assignments only when there are no internal knots. Otherwise the final solution depends on the initial parameter assignment. The method has been extended to the case of dynamic knot placement, wherein the positions of the knots are also optimized. Also the method has been successfully applied to the approximation of offset curves or surfaces. Future work will focus on the automatic selection of number of spline segments for the curves or number of patches for the surfaces, for a given error tolerance and minimum computation time.

Page 24: Parameter optimization in approximating curves and surfaces to measurement data

290 B. Sarkar. C. -H. Menq / Parameter optimization

The authors are also working on detection and elimination of degeneracies of the offset curves and surfaces.

Acknowledgements

The authors would like to thank The National Science Foundation ERC for Net Shape Manufacturing at The Ohio State University for supporting this research. The authors are thankful to Mr. Craig Demel for running the various optimization cases. Constructive com- ments from the referees are very much appreciated.

References

Bez, H.E. and Filipe. A. (1984). A new method of curve parameterization with applications in computer-aided design, Computer Graphics Forum 3, 29-34.

Chen. Y.J. and Ravani. B. (1987), Offset surface generation and contouring in computer-aided design, J. Mechanisms. Transmissions, and Automation in Design 3, 133-142.

Coquillart, S. (1987). Computing offsets of B-spline curves. Computer-aided Design 6, 305-309.

Cox. M.G. (1972). The numerical evaluation of B-splines, J. Inst. Maths. Applies. 10, 134-149.

Farouki, R.T. (1986). The approximation of non-degenerate offset surfaces, Computer Aided Geometric Design 3, 15-43.

Faux, I.D. and Pratt, M.J. (1979). Computational Geomerry for Design and Manufacture, Ellis Honvood, Chichester.

Gill, P.E. and Murray. W. (1976) Minimization subject to bounds on the variables, NPL Report NAC 72, National Physical Laboratory, England.

Grossman, M. (1970). Parametric curve fitting-Computer J. 2, 169-172.

Hayes, J.G. and Halliday, J. (1974). The least squares fitting of cubic spline surfaces to general data sets, J. Inst. Maths. Applies. 14, 89-103.

Hoschek. J. (1985). Offset curves in the plane, Computer-aided Design 2, 77-82.

Hoschek, J. (1988). Spline approximation of offset curves, Computer Aided Geometric Design 5. 33-40.

Hoschek. J., Schneider, F.-J., and Wassum, P. (1989). Optimal approximate conversion of spline surfaces, Computer Aided Geometric Design 6, 293-306.

Mass, R. (1983). An offset spline approximation for plane cubic splines, Computer-aided Design 5, 297-299.

Marquardt, D. (1963), An algorithm for least-squares estimation of non-linear parameters, SIAM J. Appl. Math. 11, 431-441.

Pham. B. (1988). Offset approximation of uniform B-sphnes, Computer-aided Design 20, 471-474.

Pratt. M.J. (1985). Smooth parametric surface approximations to discrete data, Computer Aided Geometric Design 2, 165-171.

Rogers, D.F. and Fog, N.G. (1989), Constrained B-spline curve and surface fitting, Computer-aided Design 21, 641-648.

Sarkar. B. and Menq. C.H. (1991). Smooth surface approximation and reverse engineering, Computer-aided Design, to

appear.

Tiller, W. and Hanson, E.G. (1984). Offset of two-dimensional profiles, IEEE Computer Graphics Appl. 4. 36-46.