Computer Aided Geometric North-Holland
Triangular
Presented
61
Design 2 (19X5) 61-67
at Oherwolfach
spline algorithms
12 November
19X4
Abstract. Three
simple algorithms for calculatmg btvartate box splints and their linear combinattons are gtven: recursion formula. (2) the refinement of the control net and. (3) the construction of the Bezier net. The refined net as well as the Bezier net are generated by ‘filling and averaging’ procedures. Two examples are added: the construction of a discrete box spline and the construction of the Bezier net of a Sabin spline. The indicated proofs are all very geometric.
(1) a Mansfield-like
Keywords. Spline.
box spline. refinement.
Bezier nets. algortthms,
The theory of multivariate splines was generated increasing interest. Researchers representation and handling of surfaces. In of such splines in the most interesting case
subdivision.
discrete
box sphnes.
developed in the early 80’s. and since then has in CAD hoped to get a new, useful tool for the this paper we present algorithms for the calculation other than tensor product splines.
1. Historical remarks
Triangular patches were first considered in CAGD by P. de Casteljau in 1963. He constructed his ‘surfaces a poles’ by repeated affine mappings of a ‘domain triangle’ to the triangles of a spatial net (see e.g. [Boehm et al. ‘841). Later his net of ‘poles’ was called a ‘Bezier net’. In 1982 Dahmen and Micchelli pointed out that the ‘algorithm of de Casteljau’ can be viewed as a special case of a recursion of simplex splines, as given by Micchelli in 1980 [Dahmen, Micchelli ‘831. Triangular splines were first considered in CAGD by Sabin in 1977. He constructed B-sp!ines by repeated convolutions with the unit pulse, starting e.g. with a rhombic constant [Sabin ‘771. Later Sabin’s B-splines were found to be ‘box splines’ [see Dahmen, Micchelli ‘841 or ‘half-box splines’ for certain cases [Prautzsch ‘83/84]. Triangular B-splines with minimal supports were considered among others by Sablonniere in 1982 [Sablonniere ‘821.
Fig. 1. The algorithm
0167-8396/85/$3.30
0 1985, Elsevier Science Publishers
B.V. (North-Holland)
of de Casteljau.
62
Fig. 2. The convolutions
of Sabin
2. Box splines and box spline surfaces B-splines over regular triangular grids and their properties can easily be derived from a geometric approach due to de Boor et al. and based on a general idea of Schoenberg from 1966 (see [Dahmen, Micchelli ‘831): Let B be a box in the affine space &I,,1 (described by affine coordinates y E OX”‘),and let fl be an affine map of ~2’“’ onto the affine space d2, such that the edges of B project onto the edges of a regular triangular grid. Let X be the subspace of points c._&“’ having the same image x E&‘. X is called the fibre of X. Let S = B n X be the intersection of the box and the fibre. and let V = vol S be the volume of S. Then a ‘box spline’ N is defined by N(X) = vol S. See Fig. 3. Denote by i E 2’ a point on the regular triangular grid. Therefore i + [I, - 1, l] describes the same point i. Let e, = [l, 0, 01, etc., so that i + eA is a grid point neighboring i. Let p be the triple of numbers pI of ‘origin edges’ of B which project onto the ‘directions’ eh, when the origin of B projects onto i. The box spline generated by B will be denoted by Njp( x), Note that p is unique, but i is not. Note also that translates of B correspond to translates of Nip. Thus one can normalize the Nip(x) by EN:(x)
= 1. all ie
grid.
A”
affine
map
ll I
Fig. 3. Schoenberg’s case of a box.
construction
in the
63
Fig. 4. Grid and box spline control
net.
Any linear combination .?(I)
= Cd;N;(
X)
of translates of box splines, where the coefficients dj are points E&‘. will form a triangular spline surface. In the natural ordering of the i, the ‘control points’ d, form the so-called ‘control net’ of the box spline surface s”, see Fig. 4. Note that this surface can easily be computed from the detailed knowledge of only one box spline N,P( x), because all others are translates Nip(x)=N,p(x-i), where 0 denotes the common origin of the grid and its corresponding coordinate system. The Njp are piecewise polynomials of total degree nz- 2, but it should be noted that the Nip(x) span only a subspace of p”‘p2, in general.
3. Recursion of a box spline A box spline Nip(x) can also be expressed by box splines Njp -‘I(x) of lower degree, where -e, reduces pl, by 1: Let /3r, &, & be a ‘path’ from i to x. i.e. x = i + /3,e, + ,Bzez + &ei. Then N!(X)=&
~(BI~~-‘A(xi+(/li-Bi)N~f’*(~~ci)).
where k varies from 1 to 3 and m = p, + pr + p3. In Fig. 5. where p = [2, 2, 11, the involved box splines are represented by their supports. Using this recursion formula, a box spline of order p can be reduced step by step to box splines of degree 0. These lowest degree box splines form rhombic discs, as shown in Fig. 2. left. Note that, if pl,= 0. the corresponding term in the recursion formula vanishes. The recursion formula above was first found by de Boor and Hollig from analytic considerations [de Boor, Hollig ‘821. A more geometric proof was given by Boehm in 1984 [Boehm ‘841.
P2 P, i
\
P3
PI IS p3 x
i Jzz?
NP
N P-= I ’ Fig. 5. Recursion.
involved box splines with arguments
W. Boehm /
64
Triangular
spl~e
crlgor~thms
4. Subdivision of the control net E Z, denote the points of a refined grid, such that t-i Let j = ri + (~,e, + aZeZ + a3e3, LY,_ corresponds to the point i of the initial grid. r is called the degree of refinement. A box spline Nip(x) can also be linearly expressed by box splines fij”(x) of the same order but over a refined grid. Thus any linear combination of the box splines Njp can be written as a linear combination of the box splines fijp, i.e.
sp = Cd,N,P = &jip. i
.i
The control points dj form a refined net and can easily following ‘filling and averaging’ procedure: 0.
1. 2. 3. 4. 5. 6. 7.
be computed
from
the dj by the
Let i and j also denote the position of the coordinates of dj and ij in triangular schemes. Let r he the degree of refinement. Write down the coordinutes of di into an initial scheme. Choose a direction ek, such that p, f 0 for I + k. In a refined scheme fill the ‘rhombuses ’ defined by the opposite points ri and ri + (r - l)e, by duplicates of di. Set q=[l, 1, 11-e,. For any I, for which q, < p,, and for ail j take the average of the r dutu ut j + e,, , j + rel and write it into a neM1scheme at j + re,. Set q,=q,+ 1. If q fp, got0 5.
The final scheme represents the control points of the refined net in its natural ordering. For repeated refinements, the refined nets will converge to the spline surface. See Fig. 6. Such refinement algorithms were considered in [Boehm ‘831, [Prautzsch ‘83/84], [Dahmen, Micchelli ‘841, and [Cohen et al. ‘841. A geometric proof of the above algorithm by repeated subdivision of the box B into r layers was given by Prautzsch in 1984 [Prautzsch ‘84, see also Boehm ‘84/U]. 5. Example To demonstrate the construction, it is sufficient of a single box spline, defined by the identity
to consider
the refinement
of the control
N;P(x)=CS~,~N{(X), k
initial scheme
filling Fig, 6. The refinement
averaging algorithm
scheme.
final scheme
net
W. Boehm / Trm~gulur
0 1
0
r
0
q=ll,l
intermediate
scheme
1
i
1
r
l
1221 1 12321 1 2 2 1 1 1 1
q=11,0,11 initial
65
spllne dgonthms
.;
11
scheme
Fig. 7. The refinement
algorithm.
\T 2 3 3 1 -, ,-3 5 6 3 lm 7 2-J -) -2 3 5 6 5 5 3 p’ -,I 3 3 2 p’ -,l /I 1 -\ 1
\,“,
‘G
q=12,1,1 I final
scheme
example
where 6; k is the well-known Kronecker symbol. More general nets can be constructed from this by superposition. Fig. 7 shows an example, r = 3, p = [l. 2, 11. The averaging is marked by e-4 r Schemes of numbers as shown in Fig. 7 are called ‘discrete box splines’. They depend on i, p, and r. One may visualize them by erecting the ordinates Aj over the center of the support of kjp (as a generalization of Greville’s theorem for univariate splines), and by completing the net [see Boehm ‘84/85]. It is obvious that this net can also be constructed from a pyramid in all three coordinates [Prautzsch ‘84/85], see Fig. 8.
6. Generating the BCzier points of a box spline surface A triangular box spline N!(x) can also be linearly expressed by ‘truncated of box splines polynomials’ B;lp2( x) of d e g ree m - 2. Thus any linear combination written as a linear combination of truncated Bernstein polynomials B,!“-‘:
sp = Cd&”
Bernstein Njp can be
= xb;l-2B;‘-2, I
di
The toe f ficienis b;‘~’ form the co-called ‘Bezier net’. They can easily be computed by a ‘filling and averaging’ procedure as well:
from the
0. Let i and j now denote the location of the coordinates of the Bkzier points bi und bJ in the usual triungulur schemes.
\I
p2
11
\‘Y
P3 I \’
Pl ‘A
i c@
I< I\ ‘I ’
< I
r=l
Fig. 8. Nets of two centered
discrete box splines, p = [l. 2, l]
66
from
step
r-l
filling
and averaging
Fig. 9. One step of the generating
result
algorithm.
<
1. 2. 3. 4.
Setbi=d;. Setq=[l, l,l]. Write down the coordinates of bl into un initial scheme. Set r = 4, + q2 + q3 - 2. For uny k, for which q p, in (I refined scheme fill the ‘rhombuses’ defined by the opposite points ri und ri + (r - l)e, his the dutu of the corresponding rhombuses defined by (r - 1)i und (r - 1)i + (r - l)e, of the previous .scheme. . , j + (r - l)e, und write it into u new 5. For all j take the aoeruge of the r datu at j, j + e,, scheme ut j + re, 6. Set qn = qn + 1. 7. If q zp, got0 3.
The final scheme represents the desired BCzier net in its natural ordering. used to compute the box spline surface by the algorithm of the Casteljau.
-O-
I\
‘0 -
/ \
\ step
r=l
I
step o-0-0
0
, \
0
o’_ “1’ 0
o-0-0
1’
1’ ‘1 1/ 2-y
\
/
\
r=2
0-
o/0’ ‘0
,‘Jo “0’
o-o-/l ,‘,p2$ /1, 0 0 p, / \0 0 0 1,) ,I 0 0 0 \I 1 \ / -0 o--o--o o--o--o o;. 3 o-op/o ,0,-o-/” ,0,-s / \ step
Fig. 10. Generating
This net can be
the BCzier ordinates,
\ 0 0, /1’ 1 ‘1, ,O’ 0 ‘0, , \ J ,o,m0 - 0 -/l- 2 - 3 -,2,- 1 - 0 - 0 0 0 1 2 4 4 3 1 0’ ‘0, \ 0 0‘1 ‘3 4’4 > 1’0 0 _~~~_~_l_‘~‘_3_2_~,/o-~-b/_
o/
r=3
example
9
“1, o /O
1 ,l
0 0 II“ 1. 0 0 O/ ~~o~“,“.“:~“,~,_b’-.Q /
The above algorithm can easily be derived and Prautzsch [Prautzsch ‘83/84].
by merging
the constructions
of Sabin [Sabin ‘771
7. Example To demonstrate the construction it is sufficient to consider the control net of a single box spline, defined as above. General nets can be constructed by superposition again. Fig. 10 shows the example for p = [l, 2, 21, the averaging is marked as above. It is obvious that the algorithm in three coordinates constructures the 3D Bezier net. But to avoid this in the l-dimensional case above, one must again center the schemes.
References Boehm. W. (1983). Subdrviding multtvariate splines. Computer Aided Design 15. 3455352. Boehm, W. (1984). Calculating with box splines. Computer Aided Geometric Destgn 1, 1499162. Boehm, W. (1984/X5). Multivariate apline algortthms. in: Gregory. J. ed., Morhemur/c.v o/Surfuw.\.Oxford Univ. Press. Oxford. Boehm. W.. Farin. G. and Kahmann. J. (1984) A survey of curve and surface methods in CAGD. Computer Aided Geometric Design 1. l-60. de Boor. C. and Hollig. K. (1982) Recurrence relations for multivariate B-splines. Proc. Amer. Math. Sot. Cohen. A., Lyche. T. and Riesenfeld, R. (1984). Dtscrete box splines and refinement algorithms. Computer Aided Geometric Design 1. 131-148. Dahmen. W. and Micchelli, Ch. (1982/X3). Multivariate aplines a nev, constructive approach, in: Barnhtll. R. and Boehm. W.. eds.. Sur/uce.c- in Computer Add Geomrrr~c Dmp. North-Holland. Amsterdam. 191-215. Dahmen. W. and Michelli. Ch. (1984). Subdiviston algorithms for the generation of box splines. Computer Arded Geometric Design 1. 115-129. Prautzsch. H. (1983/84). Unterteilungaalgorithmen fiir multivariate Splines. ein geometrischer Zugang. Dissertation Technische Universitat Braunschweig. Feb. 1984. Prautzsch, H. (1984). Unterteilungsalgorithmen fhr multivariate Splines. Niedersachaisches Mathematiker Kolloquium, Gottingen. Prautzsch. H. (1984/85). The location of the control points in the case of box splines. IMA J. Numer. Anal.. submitted. Sahin. M. (1977). The use of piecewise forms for numerical representation of shape. Dissertation Hungarian Academy of Science. Budapest. Sablonniere. P. (1982). Bases de Bernstein et approximants splines. Dissertatron l’universite des Sciences et Techniques de Ltlle.