Inversed rational B-spline for interpolation

Inversed rational B-spline for interpolation

Compurers d Srrucrures Vol. 43. No. 5. pp. 889-895. 1992 Printed in Great Britam INVERSED 0 RATIONAL B-SPLINE S. T. 004s7949/92 ss.cnl + 0.00 19...

452KB Sizes 21 Downloads 137 Views

Compurers d Srrucrures Vol. 43. No. 5. pp. 889-895. 1992 Printed in Great Britam

INVERSED

0

RATIONAL

B-SPLINE

S. T.

004s7949/92 ss.cnl + 0.00 1992 Pergamon Press Ltd

FOR INTERPOLATION

TAN and C. K. LEE

Department of Mechanical Engineering, University of Hong Kong, Pokfulam Road, Hong Kong (Received 21 April 1991)

Abstract-This paper describes a new approach which applies the well-known rational B-spline basis for interpolating a set of specific points. The approach is global and enhances the flexibility in controlling the geometry of the interpolating curve over the given points.

polygon for the interpolating curves is calculated, the underlying data representing the interpolating curve is exactly a normal rational B-spline basis. In addition, the inversed rational B-spline approach does not determine the curves in segment form, it generates the curve from the whole set of specified points, eliminating the need for a user to beware of segments continuity contraints.

I. INTRODUCTION The B-spline mathematical basis [I] is a useful tool for the design of curves and surfaces. The approxi-

mating curves are determined by a set of control points in the initial design stage. The desired curves may be varied by moving the control points. However, many engineering applications require the mathematical model to go through specified points exactly. In such cases, interpolating bases are required. Barsky and Greenberg[2] applied the B-spline basis directly to generate an interpolating surface. However, the result was unsatisfactory. This is because the inverse approach of determining control points for a set of points to be interpolated does not provide any parameters for controlling extraneous oscillations or wiggles that may arise from the model. Weighting or tension parameters were incorporated into other spline basis in order to control and eliminate these undesirable effects. For examples, Fletcher and McAllister [3] introduced tension parameter on Hermite interpolating space, Julien [4] applied tension on parametric cubic segment, and Kallay [5] based his approach on the minimal elastic energy properties of a flexible strip of wood to interpolate a set of specific points. Nielson [6] followed the piecewise cubic splines basis and added a tension parameter to control the interpolating curve. Barsky and Greenberg [2] introduced another exponentially based spline basis under tension. A weakness of the above mathematical models is that they are not universal enough as to be able to define a range of curve and surface types. The rational B-spline [7], which is capable of representing both quadrics and higher order curves/surfaces, provides an ideal choice for an interpolating scheme. This paper introduces a new approach of interpolation with the inversed rational B-spline mathematical basis. Since the curve is generated from rational B-spline basis, it carries all the advantages of the mathematical basis. For example, the curve is not restricted to any order, the order can be adjusted within a certain range. Furthermore, once the control

2. A BRIEF REVIEW OF RATIONAL B-SPLINE CURVES The rational B-spline model [7] is defined under homogeneous spaces (not only 3-D Euclidean space) as

Ph = (hx, hy, hz, h), where P = (x, y, z) is a point on the 3-D Euclidean space, and h > 0 is the homogeneous coordinate. The following equation defines a polynomial B-spline curve with homogeneous coordinates as P(t) = i B&)P). i=l

(1)

Bi.k is a B-spline basis function with kth order polynomial, and P) is a set of vectors representing the control polygon in homogeneous coordinates. The knot vector of Bj,k basis function is {

tj};2/

with the condition a = t, = t* =

that

. . ' =

<...

tk <

t

k+l

...

=tn+k=b,

where a and b are the lower and upper bound for the parameter t of the B-spline curve. Furthermore, a and b are subject to the constraint that 0
889

890

S.

T.

TAN

and C. K.

LEE

/

*

‘3 '

h = 5.0

-

h = 1.0

I

"3 I\

/’

\

\

t

1’

\

\

h = 0.5

Fig. 2. Interpolated rational E-spline curve with weighting {h,: 1.0, l.O,O.S, l.O} on order 3.

2. The summation

of rational

B-spline

space

is

unity

P,

_

Fig.

Rational E-spline curve with weighting 1.0) on order 3, B-spline curve and rational B-spline curve with weighting {h,: I .O, 1.O, 5.0, 1.O} 1.

i=‘iT,

Bi,k(t)h,

{h,: 1.0,1.0,0.5.

on order 3.

the first three coordinates by the homogeneous coordinate. Hence, a rational B-spline curve is defined as

3. Nonnegativity, if h,, h, > 0 and j=2,..., n - 1, then Bi.k(r)hi

,$,

,

hj 2 0 for

o

Bi,k(t)hi’

Similar to B-spline basis, properties (2) and (3) can be used to verify the following additional properties: (a) projectively invariant, (b) the convex hull, and (c) the B-spline curve is tangential to the beginning and ending segments of the control points.

i=l

where Pi is point on the 3-D Euclidean space and hi is the weight at Pi. The above basis carries the following three important properties: 1. If all hi = 1, S(t, h) becomes the corresponding B-spline basis.

Fig. 3. Interpolated

Apart from the above properties, increasing or decreasing the weight hi of a control point has significant impact on the geometry. If hi is decreasing under the condition 0 < hi < 1, then the curve would be pushed away along a straight

rational B-spline curve with weighting {hi:1.0,1.0,5.0, 1.0)on order 3.

891

Inversed rational E-spline for interpolation

concept is analogues to the approach in [9], but an additional parameter, the weighting (h) for rational B-spline is incorporated to enhance the flexibility. A set of weights (h) is assumed for the rational B-spline basis in order to determine the control polygon for a set of specified points to be interpolated. Although the method is global across the given data points, the variation of a particular h value would not affect the whole geometry. Since rational B-spline has the well-known local variation diminishing properties, the variation of a h value would only affect the segment of curves corresponding to control points belonging to that h value. The rational B-spline basis is defined as

O3 :: :: ::

:: :: : : : : : : : :

: : : : : : . : :

Ri.k(t,h) =

n

Bi,/t(tWi,

for i = 1,. . . , n.

(3)

,:, Bi,k(t)hi A set of specified points, 0 = {Oi: i = 1, . . . , n) are to be interpolated. Assume a control polygon V*

{v:: Fig. 4. Interpolating B-spline curve on order 3 (, .). Interpolating rational B-spline curve weighting {hi: 1.0, 10.0. 1.0, 10.0, 1.0) on order 3 (-).

i=l,...,n)

exists for a rational B-spline curve which passes through all the points 0. Hence 0 = RV*.

line defined by the control point and a point Pi on the curve corresponding to the control point when h = 1, as shown in Fig. 1. If hi is increasing with h, > 1, then

the curve would be pulled towards the control point, along a straight line defined similarly as above.

(4)

If R-t exists, the above set of linear equation can be solved. The inversed rational B-spline is defined as R-IO.

3. INVERSED

RATIONAL

B-SPLINE

Piegl[8] introduced a rational Bezier basis model for interpolation by a local method. In the method, the specified points are sub-divided into many segments. Each segment is interpolated locally using the rational Bezier basis, and the connection between each segment is governed by continuity constraints. Although the approach presented below uses similar rational B-spline basis the method is global. The

Fig. 5. Interpolating

(5)

CURVES

Since R forms a diagonal of R-l.

matrix,

it guarantees

the

existence

4. INTERPOLATION

From eqns (4) and (5) the following function obtained R-‘(t*, h)O = V*.

B-spline curve on order 4 (* * .). Interpolating rational B-spline curve weighting {hi: lOO.O,SO.O,75.0,50.0,200.0,200.0} on order 4 (-).

is

892

S. T. TAN and C. K. LEE

Therefore, ifR-‘(l*, h)isevaluated, then the rational Bspline basis’s control polygon V* can be established

There are two major parameters t*=(tl*:

S(t, h) = R(t, h)V*,

i=l,...,n)

and

where aGtQ6.

h={h,:

i=l,...,

n},

Fig. 6. Interpolating B-spline curve for section 03 of 0.75 block coefficient ship hull on order 3.

Fig. 7. Interpolating rational E-spline curve for section 03 of 0.75 block coefficient ship hull with {h,: 1.0. 1.0, 1.0, 1.0, 1.0, 1.0, I.O,40.0,40,0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, l.O} on order 3.

Fig. 8. Interpolating B-spline curve for section 18.5 of 0.75 block coefficient ship hull on order 3.

893

Inversed rational B-spline for interpolation

Fig. 9. Interpolating rational B-spline curve for section 18.5 of 0.75 block coefficient ship hull with {h,: 1000.0, 3000.0, 3000.0, 760.0, 750.0,25.0,4.0, 1.0, 1.0,4.0,25.0, 75.0, 760.0, 3000.0, 3000.0, 1000.0) on order 3.

will be pushed away from the point 0,. (b) hi > 1, the corresponding V: will be attracted towards the point Oi. Therefore, a curve with a tensioned characteristic would be formed near 0, as shown in Fig. 3 and compared to Fig. 2. (c) hi = 1, the result is similar to the inverted B-spline scheme suggested in [9].

where t* are the nodes [l] of the inversed rational B-spline and h is a set of weights for R-t. The node is defined as tr = t., and j-l

1

IlOi+l

-

OilI

t)? =;y

*k+

I -

[k)+ tk,

i;, II@+,-o/II forj=2,...,n and h = {hi: i = 1,. . . , n} are assumed for the calculation of R-l. The values of h can be freely adjusted by users, for tuning the geometry of the interpolated curves. The values of h can be divided into three cases: (a) 0 < hi < 1, h, represents a weight value corresponding to a point Oi. The corresponding V:

5. EXAMPLES

Figure 4 shows the difference between the inversed B-spline basis and the inversed rational B-spline basis. Both curves are third-order curves with five given points to be interpolated. There is an undesirable loop at one of the specified points in the case of the inversed B-spline curve. The inversed rational

Table 1. Table of offsets-parent

form-O.75

Sta.

Tan

0.075

0.25

Water Lines 0.75 0.50

FP

0.m 0.021 0.067 0.138 0.235 0.466 0.700 0.883 0.979 1.000 1.000 1.000 1.000 1.000 0.935 0.914 0.784 0.612 0.420 0.242 0.105 0.058 0.028 0.012 0.000

0.000 0.075 0.180 0.200 0.406 0.625 0.800 0.920 0.983 1.000 1.000 1.000 1.000 1.000 0.992 0.953 0.860 0.723 0.565 0.388 0.225 0.151 0.034 0.021 0.000

0.000 0.113 0.25 1 0.380 0.504 0.718 0.870 0.959 0.994 1.000 1.000 1.000 1.000 1.000 0.999 0.979 0.925 0.820 0.667 0.483 0.288 0.197 0.109 0.025 0.000

0.000 0.128 0.276 0.423 0.580 0.777 0.911 0.978 0.999 1.000 l.ooo 1.000 1.000 1.000 1.000 0.997 0.976 0.908 0.781 0.592 0.365 0.249 0.135 0.028 0.000

If 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 184 19 19; AP

0.000 0.138 0.290 0.441 0.585 0.806 0.930 0.985 0.999 1.000 1.000 1.000 1.000 1.000 1.000 1.000 0.980 0.953 0.863 0.712 0.488 0.354 0.211 0.061 0.080

block coefficient 1.00

1.25

1.50

0.000 0.149 0.304 0.460 0.608 0.824 0.943 0.990 1.000

0.025 0.176 0.338 0.495 0.639 0.845 0.954 0.994 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 1.000 0.980 0.958 0.899 0.794 0.715 0.614 0.486 0.320

0.062 0.235 0.403 0.557 0.690 0.867 0.962 0.998 1St00 1.OOo 1BOO 1.000 1.000 1.000 1.000 1.000 1.000 1.000 0.987 0.951 0.875 0.812 0.726 0.610 0.451

I .ooo 1.000 1.000 1.000 1.000 1.000 1.000 0.996 0.975 0.921 0.817 0.660 0.554 0.427 0.278 0.115

894

S. T. TAN and C. K. LEE

FP

10. 11. 12

1

Fig. 10. A full set of interpolating rational B-spline curves for 0.75 block coefficient ship hull from section FP to AP.

B-spline interpolation solve this problem by having higher weights at the two corner points. The curve is pulled towards these two points, thus eliminating the undesirable loop. Figure 5 shows another set of interpolating curves for comparing the difference between the B-spline basis and the rational B-sphne basis. Since the specified points are not symmetric, the interpolating curve with B-spline basis forms another undesirable loop on the portion between point O3 and OS. In order to eliminate the problem, these points are assigned with different weighing factors for h. The weighing factors for point 0, and point 0, are comparatively higher than the other points in order to pull the curve towards a more reasonable geometry. A useful application of the scheme is illustrated in Figs 6 and 7 where the design curves of ship hull sections are interpolated. Figures 6 and 7 show the difference between the B-spline basis and the rational B-spline basis at section 03 of 0.75 block coefficient ship hull and Figs 8 and 9 are a comparison example for section 18.5 of the ship hull. The detail for 0.75 block coefficient is shown on Table 1 and the whole series of design curves for 0.75 block coefficient model is generated by the inversed rational B-spline basis and shown in Fig. 10.

6.

CONCLUSION

The inversed rational B-spline interpolating curve is introduced in this paper. The weighting parameter of the rational B-spline, h, is applied to enhance the controllability for the geometry of the interpolated curve. Examples show that the inversed rational B-spline basis improved the inherent weakness of the B-spline basis interpolation method. In the examples, the set of weights, hi, is manually tuned for the required interpolating curve. It may be possible to develop a suitable algorithm for automatically pre-set the required set of weights. Acknowledgemenr-The authors would like to thank the Department of Mechanical Engineering, University of Hong Kong for providing the interactive computing facilities.

REFERENCES

1. R. Riesenfeld, Application

of E-spline approximation to geometric problems of computer aided design, Ph.D. dissertation, Syracuse University (1973). 2. B. A. Barsky and D. P. Greenberg, Interactive surface representation system using a B-spline formulation with interpolation capability. Cornpurer Aided Design 14, No. 4 (1982).

3. L. G. Y. Fletcher and D. F. McAllister, An analysis of tension methods for convexity-preserving interpolation. IEEE Computer Graphics & Applic. 7, No. 8 (1987).

4. C. Julien and M. Laborie, Bias and tension, two shape parameters for convenient specification of the parametric cubic segment. Computer Aided Design 21, No. 8 (1989). 5. M. Kallay, Method to approximate the space curve of least energy and prescribed length. Computer Aided Design 19, No. 2 (1987).

6. G. M. Nielson, Some piecewise polynomial alternatives to splines under tension. In Computer Aided Geometric Design, Academic Press, London (1974). 7. W. Tiller, Rational E-splines for curve and surface representation. IEEE Compur. Graphics & Applic. 3, No. 6 (1983).

8. L. Piegl, Interactive data interpolation by rational Bezier curves. IEEE Comput. Graphics & Applic. 7, No. 4 (1987).

9. B. A. Barsky and D. P. Greenberg, Determining a set of B-spline control vertices to generate an interpolating surface. Comput. Graphics Image Processing 14, No. 3 (1980). 10. A. J. Adams, Mathematical EIemenrs for Computer Graphics, 2nd Edn. McGraw-Hill (1989). 11. U. Bjorkenstam and S. Westberg, General cubic curve fitting algorithm using stiffness coefficients. Computer Aided Design 19, No. 2 (1987). 12. C. deBoor, Practical Guide to Splines. Springer (1978). 13. L. G. Y. Fletcher and D. F. McAllister, Natural bias approach to shape preserving curves. Computer Aided Design 18, No. 1 (1986). 14. L. G. Y. Fletcher and D. F. McAllister, Automatic tension adjustment for interpolatory splines. IEEE Comput. Graphics & Applic. 10, No. 1 (1990). 15. T. A. Foley, Local control of interval tension using weighted splines. Computer Aided Geometric Design 18, No. 3 (1986). 16. T. A. Foley, Weighted bicubic spline interpolation to rapidly varying data. ACM Trans. on Graphics 6, No. 1 (1987). 17. J. A. P. Kjellander, Smoothing of cubic parametric splines. Computer Aided Design 15, No. 3 (1983). 18. D. H. U. Kochanek and R. H. Bartels, Interpolating splines with local tension, continuity, and bias control. Computer Graphics 18, No. 3 (1984).

lnversed rational B-spline for interpolation

895

19. L. Piegl, Modifying the shape of rational B-splines. Part 1: curves. Computer Aided Design 21, No. 8

21. N. Sapidis and G. Farin, Automatic faking algorithm for B-spline curves. Computer Aided Design 22, No. 2

(1989). 20. L. Piegl, Modifying the shape of rational B-splines. Part 2: surfaces. Computer Aided Design 21, No. 9 (1989).

22. K. J. Versprille, Computer aided design application of the rational B-spline approximation form. Ph.D. dissertation, Syracuse University (1975).

(19%